| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Highstock Example</title>
- <style type="text/css">
- </style>
- </head>
- <body>
- <script src="../../code/highstock.js"></script>
- <script src="../../code/modules/data.js"></script>
- <script src="../../code/modules/exporting.js"></script>
- <div id="container" style="height: 400px; min-width: 310px"></div>
- <script type="text/javascript">
- Highcharts.getJSON('https://cdn.jsdelivr.net/gh/highcharts/highcharts@v7.0.0/samples/data/large-dataset.json', function (data) {
- // Create a timer
- var start = +new Date();
- // Create the chart
- Highcharts.stockChart('container', {
- chart: {
- events: {
- load: function () {
- if (!window.TestController) {
- this.setTitle(null, {
- text: 'Built chart in ' + (new Date() - start) + 'ms'
- });
- }
- }
- },
- zoomType: 'x'
- },
- rangeSelector: {
- buttons: [{
- type: 'day',
- count: 3,
- text: '3d'
- }, {
- type: 'week',
- count: 1,
- text: '1w'
- }, {
- type: 'month',
- count: 1,
- text: '1m'
- }, {
- type: 'month',
- count: 6,
- text: '6m'
- }, {
- type: 'year',
- count: 1,
- text: '1y'
- }, {
- type: 'all',
- text: 'All'
- }],
- selected: 3
- },
- yAxis: {
- title: {
- text: 'Temperature (°C)'
- }
- },
- title: {
- text: 'Hourly temperatures in Vik i Sogn, Norway, 2009-2017'
- },
- subtitle: {
- text: 'Built chart in ...' // dummy text to reserve space for dynamic subtitle
- },
- series: [{
- name: 'Temperature',
- data: data.data,
- pointStart: data.pointStart,
- pointInterval: data.pointInterval,
- tooltip: {
- valueDecimals: 1,
- valueSuffix: '°C'
- }
- }]
- });
- });
- </script>
- </body>
- </html>
|