$(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: 'Курс CHF, грн'},
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: 'Курс CHF',
data: [[1157068800000,4.12022],[1157155200000,4.09891],[1157241600000,4.09891],[1157328000000,4.09891],[1157414400000,4.10464],[1157500800000,4.09201],[1157587200000,4.07755],[1157673600000,4.06343],[1157760000000,4.05896],[1157846400000,4.05896],[1157932800000,4.05896],[1158019200000,4.06539],[1158105600000,4.06334],[1158192000000,4.02837],[1158278400000,4.04655],[1158364800000,4.01409],[1158451200000,4.01409],[1158537600000,4.01409],[1158624000000,4.02582],[1158710400000,4.01828],[1158796800000,4.03237],[1158883200000,4.0468],[1158969600000,4.09346],[1159056000000,4.09346],[1159142400000,4.09346],[1159228800000,4.08117],[1159315200000,4.06375],[1159401600000,4.05509],[1159488000000,4.05358],[1159574400000,4.02575]],
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: [[1157068800000, 4.120218],[1157068800000, 4.120218],[1157155200000, 4.098908],[1157241600000, 4.098908],[1157328000000, 4.098908],[1157414400000, 4.104642],[1157500800000, 4.092005],[1157587200000, 4.077547],[1157673600000, 4.063428],[1157760000000, 4.058965],[1157846400000, 4.058965],[1157932800000, 4.058965],[1158019200000, 4.065391],[1158105600000, 4.063340],[1158192000000, 4.028370],[1158278400000, 4.046552],[1158364800000, 4.014094],[1158451200000, 4.014094],[1158537600000, 4.014094],[1158624000000, 4.025823],[1158710400000, 4.018280],[1158796800000, 4.032365],[1158883200000, 4.046802],[1158969600000, 4.093464],[1159056000000, 4.093464],[1159142400000, 4.093464],[1159228800000, 4.081170],[1159315200000, 4.063752],[1159401600000, 4.055090],[1159488000000, 4.053583],[1159574400000, 4.025754]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});