123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <!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>Highcharts Example</title>
- <style type="text/css">
- </style>
- </head>
- <body>
- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
- <script src="../../code/highcharts.js"></script>
- <script src="../../code/modules/exporting.js"></script>
- <script src="../../code/modules/export-data.js"></script>
- <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
- <script type="text/javascript">
- $.getJSON(
- 'https://cdn.rawgit.com/highcharts/highcharts/057b672172ccc6c08fe7dbb27fc17ebca3f5b770/samples/data/usdeur.json',
- function (data) {
- Highcharts.chart('container', {
- chart: {
- zoomType: 'x'
- },
- title: {
- text: 'USD to EUR exchange rate over time'
- },
- subtitle: {
- text: document.ontouchstart === undefined ?
- 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'
- },
- xAxis: {
- type: 'datetime'
- },
- yAxis: {
- title: {
- text: 'Exchange rate'
- }
- },
- legend: {
- enabled: false
- },
- plotOptions: {
- area: {
- 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')]
- ]
- },
- marker: {
- radius: 2
- },
- lineWidth: 1,
- states: {
- hover: {
- lineWidth: 1
- }
- },
- threshold: null
- }
- },
- series: [{
- type: 'area',
- name: 'USD to EUR',
- data: data
- }]
- });
- }
- );
- </script>
- </body>
- </html>
|