$(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: 'Курс CAD, грн'},
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: 'Курс CAD',
data: [[1443657600000,15.869],[1443744000000,15.9418],[1443830400000,15.9733],[1443916800000,15.9733],[1444003200000,15.9733],[1444089600000,16.1777],[1444176000000,16.2348],[1444262400000,16.3581],[1444348800000,16.3252],[1444435200000,16.6172],[1444521600000,16.6172],[1444608000000,16.6172],[1444694400000,16.8775],[1444780800000,16.8102],[1444867200000,16.8102],[1444953600000,16.8148],[1445040000000,16.4754],[1445126400000,16.4754],[1445212800000,16.4754],[1445299200000,16.699],[1445385600000,16.911],[1445472000000,17.3873],[1445558400000,16.9772],[1445644800000,17.2767],[1445731200000,17.2767],[1445817600000,17.2767],[1445904000000,17.4159],[1445990400000,17.2952],[1446076800000,17.3255],[1446163200000,17.3715],[1446249600000,17.4524]],
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: [[1443657600000, 15.869031],[1443657600000, 15.869031],[1443744000000, 15.941809],[1443830400000, 15.973297],[1443916800000, 15.973297],[1444003200000, 15.973297],[1444089600000, 16.177735],[1444176000000, 16.234793],[1444262400000, 16.358093],[1444348800000, 16.325153],[1444435200000, 16.617221],[1444521600000, 16.617221],[1444608000000, 16.617221],[1444694400000, 16.877506],[1444780800000, 16.810208],[1444867200000, 16.810208],[1444953600000, 16.814786],[1445040000000, 16.475442],[1445126400000, 16.475442],[1445212800000, 16.475442],[1445299200000, 16.699035],[1445385600000, 16.911013],[1445472000000, 17.387276],[1445558400000, 16.977184],[1445644800000, 17.276650],[1445731200000, 17.276650],[1445817600000, 17.276650],[1445904000000, 17.415883],[1445990400000, 17.295206],[1446076800000, 17.325463],[1446163200000, 17.371491],[1446249600000, 17.452421]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});