$(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: 'Курс XDR, грн'},
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: 'Курс XDR',
data: [[1527811200000,37.0062],[1527897600000,37.0193],[1527984000000,37.0193],[1528070400000,37.0193],[1528156800000,37.0729],[1528243200000,37.0459],[1528329600000,37.157],[1528416000000,37.2457],[1528502400000,37.0943],[1528588800000,37.0943],[1528675200000,37.0943],[1528761600000,37.0541],[1528848000000,37.0524],[1528934400000,37.0622],[1529020800000,37.3044],[1529107200000,37.1324],[1529193600000,37.1324],[1529280000000,37.1324],[1529366400000,37.1554],[1529452800000,37.2261],[1529539200000,null],[1529625600000,36.991],[1529712000000,37.0359],[1529798400000,37.0359],[1529884800000,37.0359],[1529971200000,36.9322],[1530057600000,36.9497],[1530144000000,37.0785],[1530230400000,37.0785],[1530316800000,37.0785]],
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: [[1527811200000, 37.006205],[1527811200000, 37.006205],[1527897600000, 37.019264],[1527984000000, 37.019264],[1528070400000, 37.019264],[1528156800000, 37.072851],[1528243200000, 37.045937],[1528329600000, 37.157015],[1528416000000, 37.245728],[1528502400000, 37.094293],[1528588800000, 37.094293],[1528675200000, 37.094293],[1528761600000, 37.054053],[1528848000000, 37.052357],[1528934400000, 37.062188],[1529020800000, 37.304374],[1529107200000, 37.132448],[1529193600000, 37.132448],[1529280000000, 37.132448],[1529366400000, 37.155402],[1529452800000, 37.226065],[1529625600000, 36.991041],[1529712000000, 37.035852],[1529798400000, 37.035852],[1529884800000, 37.035852],[1529971200000, 36.932195],[1530057600000, 36.949698],[1530144000000, 37.078471],[1530230400000, 37.078471],[1530316800000, 37.078471]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});