A Few Issues

A discussion forum for the Eastwood Chart Servlet.
Locked
spin
Posts: 1
Joined: Thu Feb 14, 2008 9:46 pm

A Few Issues

Post by spin » Thu Feb 14, 2008 11:10 pm

Hi David,

The Eastwood chart API is really a good job. I'm using Google chart API now and I want to switch to Eastwood. There is a list of issue maybe you could help me to solve.

My chart:
chart.apis.google.com/chart?cht=lc&chxt=x,y&chxr=1,-2,16&chf=bg,s,000000|c,s,000000&chg=20.0,5.555&chxl=0:|01/18|01/19|01/20|01/21|01/22|01/23&chs=500x600&chd=t:11.5555,-1,-1,-1,-1,-1|222.08999999999997,-1,-1,-1,-1,-1|15.277349,10.4445,11.5555,7.4448004,9.3335,11.5555|38.775,33.22,33.22,33.22,33.22,33.22&chdl=Moon|m|Sun|s&chco=ff0000,ff0000,00ff00,00ff00&chls=3,1,0|3,6,3|3,1,0|3,6,3

1. Chart legend text: If you paste the URL above to a browser, compare eastwood and google chart, you will see there's no legend text in the chart generated by eastwood.

2. Line chart for a single value: still using my chart as an example, Google chart displays nothing, while Eastwood shows a line, but both are confusing.

3. Google chart has a size limit: 300,000 pixels. It seems Eastwood support larger chart, but it has a limit too, right?

Thank you,
Shu

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: A Few Issues

Post by david.gilbert » Thu Apr 17, 2008 3:45 pm

Thanks for the feedback...sorry it has taken me a while to respond.
spin wrote:1. Chart legend text: If you paste the URL above to a browser, compare eastwood and google chart, you will see there's no legend text in the chart generated by eastwood.
OK, I can reproduce this bug. I don't see the cause yet, but I will find it.

spin wrote:2. Line chart for a single value: still using my chart as an example, Google chart displays nothing, while Eastwood shows a line, but both are confusing.
I see the problem : Eastwood is not recognising a "-1" as a missing value. Once I fix that, Eastwood will do the same as Google - that is, the single value will not be visible.
spin wrote:3. Google chart has a size limit: 300,000 pixels. It seems Eastwood support larger chart, but it has a limit too, right?
There's no explicit limit. If you make the size too large, you'll most likely (a) run out of memory to create the BufferedImage holding the chart before it is streamed back to the client as a PNG image, or (b) get an exception out of Java2D because some coordinate is out of range (Java2D is not explicit about the minimum and maximum coordinates that it supports - as far as I can tell, it depends on the underlying implementation).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: A Few Issues

Post by david.gilbert » Thu Apr 17, 2008 9:44 pm

david.gilbert wrote:
spin wrote:1. Chart legend text: If you paste the URL above to a browser, compare eastwood and google chart, you will see there's no legend text in the chart generated by eastwood.
OK, I can reproduce this bug. I don't see the cause yet, but I will find it.
I found the cause. The legend text in Eastwood is defaulting to black (so with a black background you cannot see it). In the Google Chart API, the legend text is grey, so you can see it even on a black background. I'll fix this bug for the next release.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

dkoo761
Posts: 2
Joined: Tue Mar 31, 2009 11:54 pm

Re: A Few Issues

Post by dkoo761 » Tue Mar 31, 2009 11:58 pm

Hi there,

I ran into the 300,000 pixel limit in Eastwood which wasn't big enough for our needs (and I'm guessing many other people....in fact this was the reason we switched from Google Chart API to Eastwood :) so I removed the limit by commenting out a few lines of code in ChartServlet.java and rebuilt the JAR. Now we can render larger charts and everything works great!

I'm wondering if it would be possible to remove this limit in the next build of Eastwood so we (and others who have done a similar hack) don't need to manually update it each time we upgrade Eastwood.

Thanks!
Dave

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: A Few Issues

Post by david.gilbert » Wed May 13, 2009 10:18 am

I committed this patch (from Ingo Kegel) to Subversion for inclusion in the next release:

https://sourceforge.net/tracker/?func=d ... id=1022209

It will let you override the pixel limit.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

dkoo761
Posts: 2
Joined: Tue Mar 31, 2009 11:54 pm

Re: A Few Issues

Post by dkoo761 » Thu May 14, 2009 6:01 pm

Awesome, thanks David!

Any idea when the next release might be?? :D

Dave

Locked