$(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: [[1414800000000,13.5295],[1414886400000,13.5295],[1414972800000,13.5295],[1415059200000,13.4412],[1415145600000,13.4257],[1415232000000,14.0109],[1415318400000,14.4621],[1415404800000,15.0377],[1415491200000,15.0377],[1415577600000,15.0377],[1415664000000,15.2383],[1415750400000,16.3719],[1415836800000,16.2736],[1415923200000,16.1346],[1416009600000,15.9741],[1416096000000,15.9741],[1416182400000,15.9741],[1416268800000,null],[1416355200000,15.8737],[1416441600000,15.834],[1416528000000,15.8029],[1416614400000,15.7559],[1416700800000,15.7559],[1416787200000,15.7559],[1416873600000,15.5593],[1416960000000,15.4859],[1417046400000,15.4635],[1417132800000,15.5257],[1417219200000,15.5396],[1417305600000,15.5396]],
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: [[1414800000000, 13.529540],[1414800000000, 13.529540],[1414886400000, 13.529540],[1414972800000, 13.529540],[1415059200000, 13.441215],[1415145600000, 13.425729],[1415232000000, 14.010917],[1415318400000, 14.462076],[1415404800000, 15.037713],[1415491200000, 15.037713],[1415577600000, 15.037713],[1415664000000, 15.238269],[1415750400000, 16.371902],[1415836800000, 16.273564],[1415923200000, 16.134619],[1416009600000, 15.974128],[1416096000000, 15.974128],[1416182400000, 15.974128],[1416355200000, 15.873738],[1416441600000, 15.834028],[1416528000000, 15.802892],[1416614400000, 15.755931],[1416700800000, 15.755931],[1416787200000, 15.755931],[1416873600000, 15.559313],[1416960000000, 15.485860],[1417046400000, 15.463452],[1417132800000, 15.525685],[1417219200000, 15.539551],[1417305600000, 15.539551]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});