Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 25 total
Thread Pie chart
Mon, Apr 15 2013 11:34 AMPermanent Link

Matthew Jones

Anyone know how to do a Pie Chart in EWB?

/Matthew Jones/
Tue, Apr 16 2013 7:56 AMPermanent Link

Matthew Jones

Or any other type of chart. I have a basic bar chart done using TPanel, but
something designed for charting would be nice. Bars of course are "easy", but a pie
is a shape and I have no idea if this is possible.

/Matthew Jones/
Tue, Apr 16 2013 8:12 AMPermanent Link

Walter Matte

Tactical Business Corporation

I would make a request to my backend server and have it create a JPeg and send it back to the client.

That should work....

Walter
Tue, Apr 16 2013 9:24 AMPermanent Link

Matthew Jones

That's an idea. It actually is asking for the data anyway, so wouldn't be hard to
do. Will investigate.

/Matthew Jones/
Tue, Apr 16 2013 9:49 AMPermanent Link

Raul

Team Elevate Team Elevate

Matthew,

Once Tim ships the html5 canvas support you could draw your own or use
some of the available javascript solutions (e.g.
http://www.jqplot.com/deploy/dist/examples/ or
http://www.artetics.com/Articles/using-various-javascript-libraries-to-create-pie-chart).

Short term doing the chart on web server side and generating an image is
my suggestion as well.

Raul



On 4/16/2013 7:56 AM, (Matthew Jones) wrote:
> Or any other type of chart. I have a basic bar chart done using TPanel, but
> something designed for charting would be nice. Bars of course are "easy", but a pie
> is a shape and I have no idea if this is possible.
>
> /Matthew Jones/
>
Tue, Apr 16 2013 9:55 AMPermanent Link

Matthew Jones

Okay, quick test later, and the TImage works okay. I can flip between two names and
it reloads the image okay. It would be nice to be able to tell the image to just
refresh itself, but I figure that the best option is actually to use two images,
and cause one to refresh, and on load completion to flip it visible and the current
one invisible, to reduce load flicker.

Hmm, I see that setting the image name sets the image to invisible anyway. Quite
complicated all the things needed isn't it! Anyway, a way to trigger a reload of
the same file would be nice, so that the server can update a single image and have
it loaded again and again.

/Matthew Jones/
Tue, Apr 16 2013 11:20 AMPermanent Link

Matthew Jones

I like that first one! Will have to see how easy it is to make happen. Thanks.

/Matthew Jones/
Tue, Apr 16 2013 2:27 PMPermanent Link

Peter

On 16.04.2013 13:56, (Matthew Jones) wrote:
> Or any other type of chart.

What about Google Charts displaying in a TPage-Control?

Page1.Url := 'http://chart.apis.google.com/chart?
cht=p3&chs=450x200&chd=t:73,13,10,3,1&
chco=80C65A,224499,FF0000&
chl=Chocolate|Puff+Pastry|Cookies|Muffins|Gelato';

Greetings ... Peter
Tue, Apr 16 2013 6:58 PMPermanent Link

Robert Devine

I'd avoid using anything based on jQuery with EWB - best to use a pure
Javascript solution without any underlying dependencies. Hopefully
Tchart will get ported with the new canvas and third-party integration.
It's already available for the competition so the port might not be too
much of a problem.

I did some tests with amCharts and it worked well - but the
name-mangling that EWB does was a problem. I'm hoping Tim will give an
option to switch it off.

Cheers, Bob


On 16/04/2013 16:20, (Matthew Jones) wrote:
> I like that first one! Will have to see how easy it is to make happen. Thanks.
>
> /Matthew Jones/
>
Wed, Apr 17 2013 8:15 AMPermanent Link

Claudia Borsel

Bob Devine wrote:

>  I'm hoping Tim will give an option to switch it off.

"Compress Output" in Project Options - Compilation - Compress Output
can be deactivated.
Maybe that helps.


There is no need to do a ping pong with the server to serve a jpg or png chart,
in svg format the chart can be created by EWB pascal code locally on the fly, as demonstrated here:
http://62.108.41.186/ewbdemochart82649916562/

A mature chart library would be much more nice of course.
Page 1 of 3Next Page »
Jump to Page:  1 2 3
Image