$(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: 'Курс SEK, грн'},
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: 'Курс SEK',
data: [[1417392000000,2.01717],[1417478400000,2.02838],[1417564800000,2.03493],[1417651200000,2.03315],[1417737600000,2.03448],[1417824000000,2.04621],[1417910400000,2.04621],[1417996800000,2.04621],[1418083200000,2.06397],[1418169600000,2.05194],[1418256000000,2.08096],[1418342400000,2.08211],[1418428800000,2.08659],[1418515200000,2.08659],[1418601600000,2.08659],[1418688000000,2.0941],[1418774400000,2.08305],[1418860800000,2.0712],[1418947200000,null],[1419033600000,2.05304],[1419120000000,2.05304],[1419206400000,2.05304],[1419292800000,2.05736],[1419379200000,2.00968],[1419465600000,2.02673],[1419552000000,2.01996],[1419638400000,2.0197],[1419724800000,2.0197],[1419811200000,2.0197],[1419897600000,1.99856],[1419984000000,1.99856]],
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: [[1417392000000, 2.017173],[1417392000000, 2.017173],[1417478400000, 2.028375],[1417564800000, 2.034931],[1417651200000, 2.033150],[1417737600000, 2.034484],[1417824000000, 2.046214],[1417910400000, 2.046214],[1417996800000, 2.046214],[1418083200000, 2.063973],[1418169600000, 2.051938],[1418256000000, 2.080961],[1418342400000, 2.082113],[1418428800000, 2.086589],[1418515200000, 2.086589],[1418601600000, 2.086589],[1418688000000, 2.094096],[1418774400000, 2.083049],[1418860800000, 2.071198],[1419033600000, 2.053038],[1419120000000, 2.053038],[1419206400000, 2.053038],[1419292800000, 2.057365],[1419379200000, 2.009682],[1419465600000, 2.026728],[1419552000000, 2.019961],[1419638400000, 2.019704],[1419724800000, 2.019704],[1419811200000, 2.019704],[1419897600000, 1.998556],[1419984000000, 1.998556]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});