$(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: 'Курс EUR, грн'},
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: 'Курс EUR',
data: [[1014940800000,4.61905],[1015027200000,4.61905],[1015113600000,4.61905],[1015200000000,4.61905],[1015286400000,4.60464],[1015372800000,4.62186],[1015459200000,4.6649],[1015545600000,4.6649],[1015632000000,4.6649],[1015718400000,4.6649],[1015804800000,4.65231],[1015891200000,4.65231],[1015977600000,4.64761],[1016064000000,4.64815],[1016150400000,4.71148],[1016236800000,4.71148],[1016323200000,4.71148],[1016409600000,4.71148],[1016496000000,4.67901],[1016582400000,4.67901],[1016668800000,4.69116],[1016755200000,4.68105],[1016841600000,4.68105],[1016928000000,4.68105],[1017014400000,4.68105],[1017100800000,4.66172],[1017187200000,4.65027],[1017273600000,4.643],[1017360000000,4.64291],[1017446400000,4.64291],[1017532800000,4.64291]],
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: [[1014940800000, 4.619050],[1014940800000, 4.619050],[1015027200000, 4.619050],[1015113600000, 4.619050],[1015200000000, 4.619050],[1015286400000, 4.604640],[1015372800000, 4.621860],[1015459200000, 4.664900],[1015545600000, 4.664900],[1015632000000, 4.664900],[1015718400000, 4.664900],[1015804800000, 4.652310],[1015891200000, 4.652310],[1015977600000, 4.647610],[1016064000000, 4.648150],[1016150400000, 4.711480],[1016236800000, 4.711480],[1016323200000, 4.711480],[1016409600000, 4.711480],[1016496000000, 4.679010],[1016582400000, 4.679010],[1016668800000, 4.691160],[1016755200000, 4.681050],[1016841600000, 4.681050],[1016928000000, 4.681050],[1017014400000, 4.681050],[1017100800000, 4.661720],[1017187200000, 4.650270],[1017273600000, 4.643000],[1017360000000, 4.642910],[1017446400000, 4.642910],[1017532800000, 4.642910]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});