Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I did some more testing and I got a graph with more than 4 series, but I still couldn't get my original graph with 7 to work. So I continued to test it and I think it has to do with the layout of the legends. For some reason if I shortened the title, it works with 7 series like this:
$canvas4->title = "Monthly Average Power test test";
but
$canvas4->title = "Monthly Average Power test test test";
pushes the chart legend to the right of the graph from underneath the graph and
$canvas4->title = "Monthly Average Power test test test test";
no graph is shown unless I take out two series.
What's even stranger is right below this I have a second graph with a title just as long as the last example and with 7 series and the same legend and layout parameters and everything works fine. The only difference that I can tell is that there are 39 data points in each series in the first graph and only 12 in the second.
I assume there is some interplay behind the scenes messing with things. Hopefully documenting helps the next guy about to pull out all of his hair.
Comments
Comment #1
hshana commentedSorry, should have mentioned I was using google charts.
Comment #2
hshana commentedI did some more testing and I got a graph with more than 4 series, but I still couldn't get my original graph with 7 to work. So I continued to test it and I think it has to do with the layout of the legends. For some reason if I shortened the title, it works with 7 series like this:
$canvas4->title = "Monthly Average Power test test";
$canvas4->series = array(
'Bonneville-USBR' => $series1,
'Bonneville-USCE' => $series2,
'Southeastern-USCE' => $series3,
'Southwestern-USCE' => $series4,
'Southeastern-TVA' => $series5,
'Western-USCE' => $series6,
'Western-USBR' => $series7,
);
but
$canvas4->title = "Monthly Average Power test test test";
pushes the chart legend to the right of the graph from underneath the graph and
$canvas4->title = "Monthly Average Power test test test test";
no graph is shown unless I take out two series.
What's even stranger is right below this I have a second graph with a title just as long as the last example and with 7 series and the same legend and layout parameters and everything works fine. The only difference that I can tell is that there are 39 data points in each series in the first graph and only 12 in the second.
I assume there is some interplay behind the scenes messing with things. Hopefully documenting helps the next guy about to pull out all of his hair.
Comment #3
hshana commentedSo I ran into the same problem again trying to graph serveral series with about 100 data points each. There appears to be a limit on the amount of data (length of the url) you can pass back and forth so the process breaks (http://groups.google.com/group/google-chart-api/browse_thread/thread/d30...). This also looks to be due to microsoft (http://support.microsoft.com/kb/208427). Thanks again microsoft. Does the module support the encoding that is mentioned here (http://code.google.com/apis/chart/docs/data_formats.html#extended). Should be possible by just overriding the parameter, right?
Comment #4
rsevero commentedGoogle Charts imposes a limit of 2K URLs for charts generated with GET HTTP method as you already found out.
You can always override any parameter but there will still be a 2K limit with GET.
Patches to include support for POST HTTP method are welcomed.
Included mention of this limit on Google Charts help page with http://drupal.org/cvs?commit=443830.