I would like to be able to use the highstock library using this module to also be able to leverage the entire Highstock library API.

I have a patch that works for my project, which I will upload shortly.

CommentFileSizeAuthor
#2 add-highstock-support-2675690-1.patch9.54 KBkylesmith

Comments

kylesmith created an issue. See original summary.

kylesmith’s picture

Status: Active » Needs review
StatusFileSize
new9.54 KB

Adding my patch.

This patch assumes the highstock javascript library is downloaded in the drupal site's libraries directory, alongside the highcharts library. e.g. the libraries directory should look something like:

libraries/highcharts/index.htm
libraries/highcharts/js/...
libraries/highcharts/examples/...
libraries/highcharts/exporting-server/...
...
libraries/highstock/index.htm
libraries/highstock/js/...
libraries/highstock/examples/...
libraries/highstock/exporting-server/...
...

By default, the highcharts_render() function will return a Highcharts graph. I've added a third parameter to this function, that when set to 'highstock' will render a Highstock graph.

Note that the api is different and not all options translate directly between Highcharts and Highstock.

joonapenttila’s picture

Hi,
will this works with views ?

kylesmith’s picture

Hi joonapenttila. This patch won't affect Views directly.

The patch defines the location of the highstock library in addition to the highcharts library. Then it adds a parameter to the highcharts_render() function to choose which library the graph uses.

I'm not sure how the Highcharts module works with Views (I use highcharts/highstock graphs directly in a custom module), but where ever the View calls the highcharts_render() function would need this parameter added, and some configuration setting to know which option to use.

joonapenttila’s picture

Hi,
okay... I using this with views and need to figure out how to use histrory data for this. Highstock will be great for this!