Followed the installation instructions, but I still can only create pie charts. Everything else results to a "Uncaught TypeError: undefined is not a function" error in the highcharts.js file.

CommentFileSizeAuthor
#4 screenshot.jpg107.15 KBjedsaet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thomas_rz’s picture

Hello jedsaet, can you give us the data you used to make another chart-type (line-chart eg).
Thanks!

ps: Supported chart-types at this moment: line, spline, area, column and pie.
Other chart types will be supported in the next release.

jedsaet’s picture

Hi Thomas, the data I'm trying to add (in this case for a column chart) is fairly simple:

Year,2001,2002,2003,2004
Data,100,250,150,130,100

Can't seem to figure out where the error is, but I can't edit existing nodes with column charts. Only nodes with pie charts are editable.

jyve’s picture

Hi,

I am not experiencing any issues with your data. So in order to find a solution:
- Which module version and Easy Chart plugin version are you using? 1.0 or 1.1?
- Could you let us know which browser you are using?
- If you know how to do this, could you check in your Chrome inspector or Firebug?

jedsaet’s picture

FileSize
107.15 KB

Hi, thanks for checking.

- I'm using the 1.1 version of the module and plugin.
- This was checked in both Chrome and Firefox
- I'm attaching a screenshot of the error in Chrome. In Firefox I'm getting the following errors in the console:
- TypeError: [].concat is not a function: highcharts.js

The jQuery update module bumps up the jQuery version to 1.8.2, and I'm using highcharts version 4.0.1.

Nishruu’s picture

Same problem with both stable and dev version.
It began to happen when I saved the variables in admin/config/media/easychart.

The cause seems to be the content of the default "unwantedOptions" variable. Everything gets back to normal when I add this to the string : "plotOptions, xAxis-plotLines" (default values in jquery.easychart.js).
Maybe jyve can works something out to keep this options without crashing the easychart plugin ?

Also in easychart.module it seems variable_get('unwanted_options', '') should be variable_get('unwanted_options', *DEFAULT VALUE*), otherwise if the user doesn't save the config page, it will have no settings at all. This apply to every variable_set in the next lines. It's the reason why the module works until you save the page for the first time (jquery.easychart.js has its own correct default values).

  • jyve committed 5278192 on 7.x-1.x
    Fix for #2386105: Better default unwantedOptions
    
jyve’s picture

Status: Active » Closed (fixed)

A big thanks Nishruu! You were absolutely right and earned yourself a free upgrade to the 2.0 version of the module coming beginning of February :)

Adding ', plotOptions, xAxis-plotLines' to the unwantedOptions in the Easychart config screen solves the problem for existing sites.

The dev version of the module has been updated to fix this.