Am I missing something or does this module leave out support for pie chart rotation (chp)?

Comments

C. Lee’s picture

Category: support » feature

There is no code for chp. I think this is a feature request.

videographics’s picture

Version: 7.x-1.1 » 7.x-1.x-dev

I think you're right.

Any chance we can see support for chp? To my eyes, all of the charts coming out of Google chart API look like they're leaning on their sides. Most pie chart implementations I've seen have the origin up top.

nnevill’s picture

as a solution you can redefine theme_chart() in your template.php and add chp value there. e.g.:

/**
 * Redefines theme_chart() function.
 */
function my_theme_chart($variables) {
  $chart = $variables['chart'];
  if (chart_build($chart)) {
    $chart['#attributes']['id'] = 'chart-' . $chart['#chart_id'];
    $chart['#attributes']['class'][] = 'chart';

    return theme('image', array('path' => chart_url($chart) . '&chp=4.7', 'attributes' => $chart['#attributes'], 'alt' => $chart['#title'] ? $chart['#title'] : t('Chart')));
  }
  return '';
}

it will make all chart appearing clockwise.
not a perfect solution but better then nothing

Pierre.Vriens’s picture

Issue summary: View changes
Parent issue: » #2371075: Chart 7.x-2.x Release
Pierre.Vriens’s picture