works in google not in eastwood

A discussion forum for the Eastwood Chart Servlet.
Locked
dlbarron
Posts: 3
Joined: Wed Apr 16, 2008 7:17 pm

works in google not in eastwood

Post by dlbarron » Wed Apr 16, 2008 7:20 pm

My img tag looks like this:

<img src="chart?cht=lc&chs=500x400&chd=t:325,360,357,359|364,385,380,377&chds=290,425"

I get a blank image. When I use the same parameters in google chart it works fine. Can anyone tell me what I'm doing wrong?

Thanks
David[/code]

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

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

Thanks for reporting this.

I think the problem is that the 'chds' parameter is new (that is, not in the original Google Chart API) and Eastwood doesn't implement it yet. I need to review what has been added in the latest release of the Google Chart API and see how easily it can be implemented. There will be a new Eastwood release in May, if things go to plan.
David Gilbert
JFreeChart Project Leader

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

dlbarron
Posts: 3
Joined: Wed Apr 16, 2008 7:17 pm

Post by dlbarron » Thu Apr 17, 2008 3:30 pm

David,

Thanks for the reply.
I'm not familiar with the syntax for Google charts. In fact, yesterday was the first time I've ever used it. If "chds" is new what would I use?

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

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

Originally the text encoding required you to enter values between 0.0 and 100.0 (the axis, irrespective of the labels you attach to it, behaves as if it is showing values in the range 0.0 to 100.0). So here is your chart recoded in the old-style:

Code: Select all

chart?cht=lc&chs=500x400&chd=t:25.9,51.9,49.6,51.1|54.8,70.3,66.6,64.4
Now, it looks as though you can use any range of values, but now you have to provide (using the new 'chds' parameter) the min and max values so it knows what the axis range is. That will be simple to implement in Eastwood, so I'll get that fixed for the next release.
David Gilbert
JFreeChart Project Leader

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

dlbarron
Posts: 3
Joined: Wed Apr 16, 2008 7:17 pm

Post by dlbarron » Thu Apr 17, 2008 4:52 pm

David,

All right, I'll have to wait for the new release then.

Thanks

liza09
Posts: 1
Joined: Thu Sep 10, 2009 1:32 pm
antibot: No, of course not.

Re: works in google not in eastwood

Post by liza09 » Thu Sep 10, 2009 1:34 pm

Are there updates on this one? I have the same problem and i want it fixed.

Regards,
Liza
Pret travaux

hithwen
Posts: 1
Joined: Tue Dec 29, 2009 9:36 am
antibot: No, of course not.

Re: works in google not in eastwood

Post by hithwen » Tue Dec 29, 2009 9:48 am

Im doing an horizontal bar chart and the last index of the x axis is cropped:
Image

But same code works for google API:

chart.apis.google.com/chart?chbh=a&cht=bhg&chd=t:167,167,167,124,129,168,127,168,126,2148,127,4169,123,165,127,126,170,167,170,134&chxt=x,y&
chxl1:|5.6.00110|5.6.00108|5.6.00103|5.6.00101|5.6.00100|5.6.00099|5.6.00097|5.6.00090|5.6.00089|5.6.00083|5.6.00073|5.6.00072|5.6.00071|5.6.00070|5.6.00069|5.6.00068|5.6.00064|5.6.00063|5.6.00047|5.6.00041|
0:|0|1250|2500|3750|5000&chds=0,5000&chs=250x500&chco=0099FF

Image

Locked