I added the goolge stacked chart types for horizontal and vertical bars (cht=bhs and cht=bvs) to the google_charts module. Here is the patch, so that it could be integrated to the module.
Therefore i had to disable the simple coding for this type. Here is an example for the data schema:
$chart = array(
'#plugin' => 'google', // Google Charts API will be used
'#type' => 'hbar2Ds', // To show a horizontal stacked 2D bars chart
'#height' => 100, // in pixels
'#width' => 300, // in pixels
array(
'#legend' => t('Percentage'),
'#color' => '4D89F9,C6D9FD',
array('#value' => "20|100", '#label' => '20%'),
),
);
return charts_chart($chart);
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | goolge_charts.inc_fix_label_not_set.patch | 2.18 KB | carsten müller |
| #1 | charts.inc_chart_series_attributes.custom_attributes.patch | 488 bytes | carsten müller |
| google_charts.stacked_bars_types.patch | 2.75 KB | carsten müller |
Comments
Comment #1
carsten müller commentedHi,
here is a patch to be able to overwrite the default chart settings from the chart settings page. I need it to overwrite the #color attribute of the first chart in the settings without changing the chart color settings of series 1. So it is possible to set multiple custom colors for this series when the type is hbar2Ds without changing the default settings.
in chart.inc
Comment #2
carsten müller commentedHi,
here is also another patch for the google_charts.inc. If the label for a chart is not set it will be set with NULL. But then an empty param for the label (&chl=) will be submitted.
Here is a small fix
Comment #3
kenorb commentedComment #4
brmassa commentedCarsten,
the problem pointed on comment #2 fixed by another way. The problem with your patch is that if the 1st and the 3rd series have labels, but not the 2nd, the 2nd will get the 3rd label.
im now going to give a look on the other patches..
regards,
massa
Comment #5
quicksketchThe D6 version of the module is no longer being updated. Please reopen if the same problem exists in the D7 version.