Skip to content

Instantly share code, notes, and snippets.

@TorsteinHonsi
Last active March 25, 2021 06:26
Show Gist options
  • Save TorsteinHonsi/e8a1e6971608523eb8dd to your computer and use it in GitHub Desktop.
Save TorsteinHonsi/e8a1e6971608523eb8dd to your computer and use it in GitHub Desktop.
// This gist is deprecated, doesn't work with newer versions of JSDom.
// Instead, use https://www.npmjs.com/package/highcharts-jsdom
@sorb999
Copy link

sorb999 commented Dec 20, 2018

Is it also applicable for stock chart?? I am trying to create stock chart using jsdom but not able to get clear image.

@TorsteinHonsi
Copy link
Author

Hi, I have now deprecated this gist (didn't work with latest jsdom) and created an npm package instead. See https://www.npmjs.com/package/highcharts-jsdom.

I was able to create a stock chart using the following config:

hc({
	infile: 'examples/column.json',
	outfile: 'chart.svg',

	// Constructor, defaults to 'chart'
	constr: 'stockChart',

	// Module files etc
	extensions: [
		'modules/stock'
	]
}).then((result) => {
	console.log(result);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment