$(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: [[1564617600000,25.27],[1564704000000,25.463],[1564790400000,25.9466],[1564876800000,25.9466],[1564963200000,25.9466],[1565049600000,26.4178],[1565136000000,26.2184],[1565222400000,26.0785],[1565308800000,25.9423],[1565395200000,25.7839],[1565481600000,25.7839],[1565568000000,25.7839],[1565654400000,25.8941],[1565740800000,26.0011],[1565827200000,26.0071],[1565913600000,25.9906],[1566000000000,25.6571],[1566086400000,25.6571],[1566172800000,25.6571],[1566259200000,25.6823],[1566345600000,25.6311],[1566432000000,25.7352],[1566518400000,25.4515],[1566604800000,25.4586],[1566691200000,25.4586],[1566777600000,25.4586],[1566864000000,25.4586],[1566950400000,25.6736],[1567036800000,25.7114],[1567123200000,25.6776],[1567209600000,25.4368]],
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: [[1564617600000, 25.270033],[1564617600000, 25.270033],[1564704000000, 25.462965],[1564790400000, 25.946557],[1564876800000, 25.946557],[1564963200000, 25.946557],[1565049600000, 26.417816],[1565136000000, 26.218427],[1565222400000, 26.078523],[1565308800000, 25.942348],[1565395200000, 25.783878],[1565481600000, 25.783878],[1565568000000, 25.783878],[1565654400000, 25.894088],[1565740800000, 26.001125],[1565827200000, 26.007122],[1565913600000, 25.990648],[1566000000000, 25.657102],[1566086400000, 25.657102],[1566172800000, 25.657102],[1566259200000, 25.682251],[1566345600000, 25.631149],[1566432000000, 25.735168],[1566518400000, 25.451464],[1566604800000, 25.458632],[1566691200000, 25.458632],[1566777600000, 25.458632],[1566864000000, 25.458632],[1566950400000, 25.673593],[1567036800000, 25.711353],[1567123200000, 25.677575],[1567209600000, 25.436833]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});