ToddR
Posts: 8
Joined: Mon Oct 20, 2014 5:49 pm

Rendering Charts as SVG On Server Not Using Highcharts.js

When rendering charts as SVG on the server using PhantomJS, it appears to always use highstock.js, regardless of the Constructor parameter. You can see this on the demo site: http://export.highcharts.com/demo.

Set the Image File Format to SVG. Generate the image as Chart and as StockChart. Look at the SVG that is generated. Both will have a description of "Created with Highstock 2.0.4". Shouldn't Chart result in a description of "Created with Highcharts 4.0.4"? That's what I see when I generate charts via my website using hightcharts.js.

As an experiment, I edited the highcharts-convert.js file. I edited line 24 to use highcharts.js instead of highstock.js. This caused the resulting SVG to have the description I would expect, i.e. "Created with Highcharts 4.0.4". So is the Constructor parameter not working correctly?
User avatar
KacperMadej
Posts: 4632
Joined: Mon Sep 15, 2014 12:43 pm

Re: Rendering Charts as SVG On Server Not Using Highcharts.j

Your problem will be passed on to the second line of support.
Kacper Madej
Highcharts Developer
torstein.honsi
Site Admin
Posts: 9215
Joined: Thu Nov 09, 2006 11:22 am
Location: Vik i Sogn, Norway

Re: Rendering Charts as SVG On Server Not Using Highcharts.j

Highcharts is included in Highstock in its entirety, so using the "Chart" constructor in Highstock will give the same results as if you were using Highcharts. It doesn't matter whether we're running Highstock or Highcharts, except Highstock has more features (like the StockChart constructor) than Highcharts. See for example http://jsfiddle.net/highcharts/L840fwnd/.
Torstein Hønsi
CTO, Founder
Highsoft
ToddR
Posts: 8
Joined: Mon Oct 20, 2014 5:49 pm

Re: Rendering Charts as SVG On Server Not Using Highcharts.j

Okay, that makes sense. Thank you.

Return to “Highcharts Usage”