User avatar
Philippe
Posts: 13
Joined: Fri Mar 11, 2011 12:25 pm

node.js detection

We are using node.js to generate server side charts.
There are only a few minor issues and we had to modify the source code for this.
any possibility to include the changes or point us to right direction to avoid having to modify the code?

Here are the changes (highstock version 1.1.5)
UserAgent detection
userAgent = navigator.userAgent,
isIE = /msie/i.test(userAgent) && !win.opera,
docMode8 = doc.documentMode === 8,
isWebKit = /AppleWebKit/.test(userAgent),
isFirefox = /Firefox/.test(userAgent),
isNode = /Node.js/.test(userAgent),
SVG_NS = 'http://www.w3.org/2000/svg',
hasSVG = isNode || !!doc.createElementNS && !!doc.createElementNS(SVG_NS, 'svg').createSVGRect,
(had to force hasSVG)

Line 5633
// the label is created on init - now move it into place
if (label && !isNaN(x)) {
if (isNode && labelOptions.x === null) labelOptions.x = 0;
if (isNode && labelOptions.y === null) labelOptions.y = 0;

Using node the labelOptions.y is null or NaN (why ???)

line 6951
if (isNode && isNaN(axisTitleMargin))
axisTitleMargin = 33;

Hardcode the margin (for now)

Thanx for your help
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: node.js detection

Hi, sorry for late reply. I sent topic forward, someone should answer you soon.
Slawek Kolodziej
Highcharts support team
eolsson
Posts: 396
Joined: Tue May 03, 2011 11:07 am

Re: node.js detection

Hi,
we will not get to officially supporting node.js before version 3.0 (http://www.highcharts.com/support/roadmap), there's no time for that. But it's a good idea so in the future we would like to see this happen.

* You could add a feature request at UserVoice (http://highcharts.uservoice.com/forums/55896-general) so others can vote on it.
* If you want to merge in code to the main branch, the best way (for us at least) is if you create a Pull Request at github (https://github.com/highslide-software/highcharts.com)
Erik Olsson
Highsoft Solutions AS
User avatar
Philippe
Posts: 13
Joined: Fri Mar 11, 2011 12:25 pm

Re: node.js detection

Adde my vote to the server chart topic with comments

Return to “Highcharts Stock”