Range selector with data grouping
(async () => { // Load the dataset const data = await fetch( 'https://demo-live-data.highcharts.com/aapl-c.json' ).then(response => response.json()); Highcharts.setOptions({ lang: { rangeSelectorZoom: 'Granularity' } }); // Create the chart Highcharts.stockChart('container', { rangeSelector: { allButtonsEnabled: true, buttons: [{ type: 'month', count: 3, text: 'Day', dataGrouping: { forced: true, units: [['day', [1]]] } }, { type: 'year', count: 1, text: 'Week', dataGrouping: { forced: true, units: [['week', [1]]] } }, { type: 'all', text: 'Month', dataGrouping: { forced: true, units: [['month', [1]]] } }], buttonTheme: { width: 60 }, selected: 2 }, title: { text: 'AAPL Stock Price' }, subtitle: { text: 'Custom data grouping tied to range selector' }, _navigator: { enabled: false }, series: [{ name: 'AAPL', data: data, marker: { enabled: null, // auto radius: 3, lineWidth: 1, lineColor: '#FFFFFF' }, tooltip: { valueDecimals: 2 } }] }); })();
StockVarious features
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