Compare multiple series
// Data from nasdaq.com (async () => { const names = ['MSFT', 'AAPL', 'GOOG']; /** * Create the chart when all data is loaded * @return {undefined} */ function createChart(series) { Highcharts.stockChart('container', { rangeSelector: { selected: 4 }, yAxis: { labels: { format: '{#if (gt value 0)}+{/if}{value}%' }, plotLines: [{ value: 0, width: 2, color: 'silver' }] }, plotOptions: { series: { compare: 'percent', showInNavigator: true } }, tooltip: { pointFormat: '<span style="color:{series.color}">' + '{series.name}</span>: <b>{point.y}</b> ' + '({point.change}%)<br/>', valueDecimals: 2, split: true }, series }); } const series = []; for (const name of names) { const response = await fetch( 'https://cdn.jsdelivr.net/gh/highcharts/highcharts@f0e61a1/' + 'samples/data/' + name.toLowerCase() + '-c.json' ); const data = await response.json(); series.push({ name, data }); } createChart(series); })();
StockGeneral
Install with NPM
The official Highcharts NPM package comes with support for CommonJS and contains Highcharts, and its Stock, Maps and Gantt packages.
npm install highcharts --save
See more installation optionsDownload our library
The zip archive contains Javascript files and examples. Unzip the zip package and open index.html in your browser to see the examples.
DownloadBuy a license
You can download and try out all Highcharts products for free. Once your project/product is ready for launch, purchase a commercial license.
See License Pricing