$(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: 'Курс PLN, грн'},
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: 'Курс PLN',
data: [[1464739200000,6.39302],[1464825600000,6.37683],[1464912000000,6.38391],[1464998400000,6.35811],[1465084800000,6.35811],[1465171200000,6.35811],[1465257600000,6.47757],[1465344000000,6.51394],[1465430400000,6.56552],[1465516800000,6.54649],[1465603200000,6.48697],[1465689600000,6.48697],[1465776000000,6.48697],[1465862400000,6.41115],[1465948800000,6.30854],[1466035200000,null],[1466121600000,6.25499],[1466208000000,6.30467],[1466294400000,6.30467],[1466380800000,6.30467],[1466467200000,6.30467],[1466553600000,6.40209],[1466640000000,6.41601],[1466726400000,6.50413],[1466812800000,6.17843],[1466899200000,6.17843],[1466985600000,6.17843],[1467072000000,6.17843],[1467158400000,6.17843],[1467244800000,6.2275]],
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: [[1464739200000, 6.393020],[1464739200000, 6.393020],[1464825600000, 6.376835],[1464912000000, 6.383912],[1464998400000, 6.358111],[1465084800000, 6.358111],[1465171200000, 6.358111],[1465257600000, 6.477573],[1465344000000, 6.513939],[1465430400000, 6.565518],[1465516800000, 6.546487],[1465603200000, 6.486968],[1465689600000, 6.486968],[1465776000000, 6.486968],[1465862400000, 6.411154],[1465948800000, 6.308541],[1466121600000, 6.254989],[1466208000000, 6.304671],[1466294400000, 6.304671],[1466380800000, 6.304671],[1466467200000, 6.304671],[1466553600000, 6.402091],[1466640000000, 6.416010],[1466726400000, 6.504135],[1466812800000, 6.178428],[1466899200000, 6.178428],[1466985600000, 6.178428],[1467072000000, 6.178428],[1467158400000, 6.178428],[1467244800000, 6.227500]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});