Charting Libraries
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
This documentation page contains various details about the charting libraries that are used by the Charts module to actually render a chart (sometimes also called 'Chart Providers').
Feel free to correct / extend / refine this community documentation where appropriate.
Supported Charting Libraries
The Charts module supports the use of multiple charting libraries. Out of the box, it comes with support for these libraries:
- C3, Google Charts, or Highcharts (Charts release 8.x-3.x)
- Google Charts or Highcharts (Charts release 7.x-2.x and above)
- Open Flash Charts or FusionCharts (Prior Charts releases)
One of the beauties of the charts module, is that for any chart created with it, you should be able to just swap from one of the supported libraries to another one, without changing any of the other options (specifications) of your chart.
The Drupal 8 version of Charts has expanded options available to users, such as 3D and polar plotting options. Such features will only be added so long as they do not break the chart when switching to a charting provider that does not support the given option. For example, C3 does not support polar plotting, so although that can be enabled for Highcharts, it is skipped for C3.
Issue #2374863: Policy about supported charting libs? contains more details about the support for various libraries.
Pros and cons of various Charting Libraries
Each of these libraries has particular advantages and disadvantages. Here are some details about it for some of the libraries which are supported as of Charts release 7.x-2.x and above:
- C3: this library makes it easy to generate D3-based charts by wrapping the code required to construct the entire chart. A benefit to this library is that it gives an alternative to Google Charts and does not require a license, as Highcharts does.
- Google Interactive Charts: this library generates interactive charts using SVG and VML. It does not require any external downloads and doesn't require to license an extra library. So it works out-of-the box, right after you enabled the charts module. Its charts are generated on their servers, which implies that you must have a working internet connection for the charts to be rendered. So you can't use it off-line in a local development environment.
- Highcharts: this library is one of the premier solutions for generating charts. Although it is very powerful and aesthetically pleasing with smooth animations, it requires a license, which is free for non-commercial use. You must download an extra library before it can be used as a charts provider. Works even without an internet connection for the charts to be rendered, so you can use it also off-line in a local development environment. The 8.x-3.x version of Charts adds a few additional Highcharts files for exporting data and increased accessibility.
For the sake of completeness, here are some more details for some of the libraries which were supported in prior releases of Charts (but not anymore in release 7.x-2.x and above):
- Google Image Charts: this library is very peculiar since its charts are static images generated on their servers. Its the most simple one but it will work without any further configuration. Google limits the number of generated charts per day. The number is very big, but it might not be a good solution for heavy sites.
- Open Flash Chart: This open source project has a single Flash file that generates several types of charts. These charts also have some special effects. The flash file is not included with this module, it needs to be downloaded separately.
- FusionCharts: FusionCharts also uses Flash and it has the most complete set of chart types and effects. The FusionCharts filter works with both free and complete versions. The flash file is not included with this module, it needs to be downloaded separately.
Charting Libraries Features
The table below contains a summary of some of the features supported by each of the supported libraries. It is still (extremely) incomplete though, so please help completing it (e.g. by updating the "?"-marks).
Charts API | C3 | Google Charts | Highcharts | Open Flash Charts | FusionCharts | |
---|---|---|---|---|---|---|
Single Type Charts | ||||||
Pie 2D | Yes | Yes | Yes | Yes | Yes | Yes |
Pie 3D | Yes | No | Yes | Yes | Yes | Yes |
Donut 2D | Yes | Yes | Yes | ? | ? | ? |
Donut 3D | Yes | No | Yes | ? | ? | ? |
Line 2D | Yes | Yes | Yes | Yes | Yes | Yes |
Line 3D | Yes | --- | --- | Yes | Yes | |
Area 2D | Yes | Yes | Yes | Yes | Yes | Yes |
Area 3D | Yes | No | Yes | Yes | Yes | Yes |
Venn | Yes | --- | Yes | --- | --- | --- |
Scatter | Yes | Yes | Yes | Yes | --- | --- |
Polar plotting | Yes | No | No | Yes | --- | --- |
Labels | ||||||
X labels | Yes | Yes | Yes | Yes | Yes | Yes |
Y labels | Yes | Yes | Yes | ? | --- | --- |
Single point labels | Yes | Yes | Yes | ? | --- | --- |
Legends | ||||||
Series | Yes | Yes | Yes | Yes | Yes | Yes |
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion