$(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: 'Курс GBP, грн'},
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: 'Курс GBP',
data: [[1014940800000,7.56849],[1015027200000,7.56849],[1015113600000,7.56849],[1015200000000,7.56849],[1015286400000,7.55231],[1015372800000,7.56566],[1015459200000,7.56675],[1015545600000,7.56675],[1015632000000,7.56675],[1015718400000,7.56675],[1015804800000,7.56104],[1015891200000,7.56104],[1015977600000,7.52407],[1016064000000,7.5067],[1016150400000,7.58326],[1016236800000,7.58326],[1016323200000,7.58326],[1016409600000,7.58326],[1016496000000,7.57858],[1016582400000,7.57858],[1016668800000,7.57128],[1016755200000,7.58802],[1016841600000,7.58802],[1016928000000,7.58802],[1017014400000,7.58802],[1017100800000,7.59856],[1017187200000,7.57619],[1017273600000,7.57422],[1017360000000,7.57408],[1017446400000,7.57408],[1017532800000,7.57408]],
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, 7.568490],[1014940800000, 7.568490],[1015027200000, 7.568490],[1015113600000, 7.568490],[1015200000000, 7.568490],[1015286400000, 7.552310],[1015372800000, 7.565660],[1015459200000, 7.566750],[1015545600000, 7.566750],[1015632000000, 7.566750],[1015718400000, 7.566750],[1015804800000, 7.561040],[1015891200000, 7.561040],[1015977600000, 7.524070],[1016064000000, 7.506700],[1016150400000, 7.583260],[1016236800000, 7.583260],[1016323200000, 7.583260],[1016409600000, 7.583260],[1016496000000, 7.578580],[1016582400000, 7.578580],[1016668800000, 7.571280],[1016755200000, 7.588020],[1016841600000, 7.588020],[1016928000000, 7.588020],[1017014400000, 7.588020],[1017100800000, 7.598560],[1017187200000, 7.576190],[1017273600000, 7.574220],[1017360000000, 7.574080],[1017446400000, 7.574080],[1017532800000, 7.574080]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});