I have a series of pie charts being displayed through Views and the Views Dataviz module. I've also experimented with other chart modules that use the (interactive) Google Charts charting engine.

When these charts are generated through their integration with the Views module, I wonder how I can alter the chart output by using the options in the Google Chart API (options such as colour, legend, font size, etc).

I've looked in the code of individual charting modules, but I'm not sure where I can customize the output of the charts.

  • Writing a custom module for charts to me looks like the best option for D7 at the moment depending of course on the complexity of your data. Commented Jul 5, 2013 at 12:43

1 Answer 1


Finding an appropriate charting module

To create charts in Drupal, consider the Comparison of Charting Modules as a possible place to start from, to find the module that best fits your needs. That comparison does include the modules mentioned here, but quite AbitMORE charting modules ...

Possible alternatives that should solve this specific question, are the Chart module, or the Charts module (confusing names, I didn't invent them). Though there are other alternatives in that comparison that might be a better fit for this specific case.

Selection criteria

The license that comes with the related charting library (engine) in each of these modules, should be considered also (open source or not, license fee, etc). It is one of the (important?) selection criteria for deciding on the module to go for.

Some other typical items to consider are:

  • Possible privacy concerns.
  • Yes or no support for saving charts in PDFs (usually supported by PHP based libraries, and not supported by JS based libraries).
  • Flash based libraries should be avoided if charts are to be displayed on mobile devices.
  • Some libraries (like the Google flavors ...) require a working internet connection (not always available in local DEV environments ...).

Available options specific to the Charts module

The Charts module is possibly one of those "other charting modules" that you experimented with. For the Charts module, the currently closest answer (solution?) you can find is described in issue #2209467. And the closest solution to get this to work, is as described in comment #4 (which also includes an interesting patch). Be aware of the current status of that issue, i.e.:

  • the patch only works for Highcharts (as charting engine), the Google Charts counterpart of it is still missing (and prereq for adding this feature to the Charts module).
  • it is related to the Charts API (which is different from the Views integration). So after the Charts API feature gets delivered, some more (minor?) work is needed to also make it available within the Views integration of the Charts module.

So only considering the Charts module as an alternative, and applying the suggested patch is not sufficient. But at least it should help somehow to understand what the missing pieces are. And maybe inspire somebody to submit 1 (or more) additional patch(es) to make it complete?

Disclosure: I'm the author of the comparison and charting modules mentioned above, I hope this does not violate the site's policy on self-promotion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.