1

I want to create 3d charts using the Charts module and with Highcharts as its charting engine (library).

How can I create such 3d charts?

2 Answers 2

1

In the latest -dev version of the Charts module (D8), there is a checkbox to enable 3D for Highcharts and Google.

0

There is no out-of-the-box answer to your question to make this work with the Charts module (disclosure: I'm a co-maintainer), at least not as of today (yet). But if you're willing (and able) to complete a few extra steps, you should get it to work. Use the details below as a guide.

You could use the approach as described in the issue about Pass library-specific options via existing #raw_options, AFTER you apply the patch in comment nr 4 of this issue. If you're using the most recent dev version of the Charts module (which is stable and includes various patches on top of the rc1 release), then this patch is already available (no more need to apply it).

Be aware that this only works for Highcharts as of right now (waiting for a similar patch to become available for Google Charts also).

PS 1: know that there are so many options / features in either of the supported charting engines (libraries), i.e. Google Charts and Highcharts. Which is also why it's virtually impossible to support all those options out-of-the-box.

PS 2: I'm assuming this question is about D7.

5
  • Thank you for replying. I achieved this using following hook hook_chart_definition_alter($definition, $chart, $chart_id) Commented Feb 28, 2017 at 11:15
  • Hi. @SonvirChoudhary. Can you show your code on how to implement the 3d chart? Thanks.
    – zephirus
    Commented Mar 22, 2017 at 16:04
  • @zephirus use this hook hook_chart_definition_alter($definition, $chart, $chart_id) Commented Mar 27, 2017 at 5:33
  • @zephirusif ($chart_id == 'shop_graphs__block_1') { $definition['chart']['options3d'] = array( "enabled" => true, "alpha" => 12, "beta" => 0, "depth" => 20, "viewDistance" => 50 ); } Commented Mar 27, 2017 at 5:33
  • Thanks Sonvir Choudhary. I tried what you said but I don't see any modifications. I'm using Highcharts and tried with bar and column types of chart. Here's my code: pasteat.me/view/1a52d4cb. I'm using Charts 7.x-2.0-rc1+5-dev.
    – zephirus
    Commented Mar 27, 2017 at 10:27

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.