$(document).ready(function () {
chart = new Highcharts.StockChart({
chart: {
renderTo: 'chart',
type: 'line',
animation: false,
showAxes: true,
height: 500
},
xAxis: {
ordinal: false,
type: 'datetime',
showEmpty: true,
gridLineWidth: 1,
gridLineDashStyle: 'dot',
ordinal: false
},
yAxis: {
title: {text: 'Курс AUD, грн'},
lineWidth: 3,
gridLineWidth: 1,
gridLineDashStyle: 'dash',
ordinal: false
},
plotOptions: {
series: {connectNulls: true, shadow: false},
spline: {marker: {enabled: true}}
},
tooltip: {valueDecimals: 8, xDateFormat: '%d %b %Y', shared: true},
series: [
{
name: 'Курс AUD',
data: [[1541030400000,19.9254],[1541116800000,20.231],[1541203200000,20.2773],[1541289600000,20.2773],[1541376000000,20.2773],[1541462400000,20.1566],[1541548800000,20.2343],[1541635200000,20.3462],[1541721600000,20.3622],[1541808000000,20.2042],[1541894400000,20.2042],[1541980800000,20.2042],[1542067200000,20.1201],[1542153600000,20.1169],[1542240000000,20.0852],[1542326400000,20.174],[1542412800000,20.1567],[1542499200000,20.1567],[1542585600000,20.1567],[1542672000000,20.2598],[1542758400000,20.1815],[1542844800000,20.1516],[1542931200000,20.125],[1543017600000,20.0877],[1543104000000,20.0877],[1543190400000,20.0877],[1543276800000,20.2381],[1543363200000,20.3683],[1543449600000,20.4545],[1543536000000,20.8237]],
tooltip: {valueSuffix: ' грн'},
type: 'area',
step: true,
color: '#888888',
fillColor: {
linearGradient: {x1: 0, y1: 0, x2: 0, y2: 1},
stops: [[0, '#CCCCCC'], [1, 'rgba(50,50,50,0)']]
},
threshold: null
},
{
name: 'Среднее за период',
data: [[1541030400000, 19.925428],[1541030400000, 19.925428],[1541116800000, 20.230973],[1541203200000, 20.277301],[1541289600000, 20.277301],[1541376000000, 20.277301],[1541462400000, 20.156559],[1541548800000, 20.234299],[1541635200000, 20.346181],[1541721600000, 20.362204],[1541808000000, 20.204211],[1541894400000, 20.204211],[1541980800000, 20.204211],[1542067200000, 20.120054],[1542153600000, 20.116869],[1542240000000, 20.085197],[1542326400000, 20.173989],[1542412800000, 20.156685],[1542499200000, 20.156685],[1542585600000, 20.156685],[1542672000000, 20.259815],[1542758400000, 20.181467],[1542844800000, 20.151594],[1542931200000, 20.125042],[1543017600000, 20.087741],[1543104000000, 20.087741],[1543190400000, 20.087741],[1543276800000, 20.238129],[1543363200000, 20.368321],[1543449600000, 20.454501],[1543536000000, 20.823674]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});