Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Google chart allows to create donut charts. This is just an option for the pie chart.
Check it out at https://google-developers.appspot.com/chart/interactive/docs/gallery/pie...
would be cool to have this option
Comment | File | Size | Author |
---|---|---|---|
#5 | 2661406-fix-for-donut-chart.patch | 1.48 KB | preethi_warrier |
Comments
Comment #2
mcprobin CreditAttribution: mcprobin as a volunteer commentedIt is a bad hack and someone who maintains this should probably do it right but if you really need it ...
Inside the file charts_google.inc
and function (at line 60)
function _charts_google_populate_chart_options($chart, $chart_definition) {
Add:
$chart_definition['options']['pieHole']= $chart['#pie_hole_size'] ? $chart['#pie_hole_size'] : 0;
Then you can put in your own code:
$chart = array(
'#type' => 'chart',
'#title' => t('Example Donut Chart'),
'#chart_type' => 'pie',
'#legend_position' => 'right',
'#data_labels' => TRUE,
'#tooltips' => TRUE,
'#pie_hole_size' = 0.4
);
Comment #3
samuel.seide CreditAttribution: samuel.seide commentedDon't do it inside the module code, write your own custom module. Here's one I wrote that adds in piechart and some other options.
Comment #4
sashkernel CreditAttribution: sashkernel commentedSamuel,
Do you have your module published on Drupal site?
Comment #5
preethi_warrier CreditAttribution: preethi_warrier commentedI have submitted a patch for this feature request. Please review.
Comment #6
preethi_warrier CreditAttribution: preethi_warrier as a volunteer commentedComment #7
preethi_warrier CreditAttribution: preethi_warrier as a volunteer commented