I would like to say that I really enjoy using the support module.

When looking at my charts, I saw the odd efect, that some charts show two 50% slices whereas the numbers are way different. After some research I found that either of the two is nessecary:

  • getting the chart module to add the parameter chds=0,100000000 to the chart.apis.google.com URL, or
  • rescaling of all numbers, so that the sum is less or equal to 100, for example like this
        foreach($chart['#data'] as $i=>$v) {
          $chart['#data'][$i] = $v / $count_total;
        }
    

    , before submitting the $chart array to chart_render.

    I attached a possible patch to the faulty support_chart module

Comments

jeremy’s picture

Version: 6.x-1.3 » 7.x-1.x-dev
Status: Active » Patch (to be ported)

The Drupal chart api module had an option to automatically scale charts for us - I simply added this option when building the chart. Fix committed in 6.x-1.x:
http://drupalcode.org/project/support.git/commit/09c22fa

bdragon’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gogowitsch’s picture

Thanks for the fix, the support_chart module is fine now. Unfortunately, the Chart API module seems to have an issue caused by improper rounding.