Created
December 5, 2020 07:28
-
-
Save wignesh/46110e30885cb06588c4d1bfcfd4a212 to your computer and use it in GitHub Desktop.
Intraday area
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="container" style="height: 400px; min-width: 310px"></div> | |
| <script src="https://code.highcharts.com/stock/highstock.js"></script> | |
| <script src="https://code.highcharts.com/stock/modules/data.js"></script> | |
| <script src="https://code.highcharts.com/stock/modules/exporting.js"></script> | |
| <script src="https://code.highcharts.com/stock/modules/export-data.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Highcharts.getJSON('https://cdn.jsdelivr.net/gh/highcharts/[email protected]/samples/data/new-intraday.json', function (data) { | |
| // create the chart | |
| Highcharts.stockChart('container', { | |
| title: { | |
| text: 'AAPL stock price by minute' | |
| }, | |
| subtitle: { | |
| text: 'Using ordinal X axis' | |
| }, | |
| xAxis: { | |
| gapGridLineWidth: 0 | |
| }, | |
| rangeSelector: { | |
| buttons: [{ | |
| type: 'hour', | |
| count: 1, | |
| text: '1h' | |
| }, { | |
| type: 'day', | |
| count: 1, | |
| text: '1D' | |
| }, { | |
| type: 'all', | |
| count: 1, | |
| text: 'All' | |
| }], | |
| selected: 1, | |
| inputEnabled: false | |
| }, | |
| series: [{ | |
| name: 'AAPL', | |
| type: 'area', | |
| data: data, | |
| gapSize: 5, | |
| tooltip: { | |
| valueDecimals: 2 | |
| }, | |
| fillColor: { | |
| linearGradient: { | |
| x1: 0, | |
| y1: 0, | |
| x2: 0, | |
| y2: 1 | |
| }, | |
| stops: [ | |
| [0, Highcharts.getOptions().colors[0]], | |
| [1, Highcharts.color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')] | |
| ] | |
| }, | |
| threshold: null | |
| }] | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment