$(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: 'Курс DKK, грн'},
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: 'Курс DKK',
data: [[1498867200000,3.99347],[1498953600000,3.99347],[1499040000000,3.99347],[1499126400000,3.97401],[1499212800000,3.97186],[1499299200000,3.97889],[1499385600000,3.98952],[1499472000000,3.99314],[1499558400000,3.99314],[1499644800000,3.99314],[1499731200000,3.98179],[1499817600000,3.9832],[1499904000000,3.98891],[1499990400000,3.98677],[1500076800000,3.9937],[1500163200000,3.9937],[1500249600000,3.9937],[1500336000000,4.002],[1500422400000,4.02876],[1500508800000,4.02337],[1500595200000,4.00429],[1500681600000,4.05293],[1500768000000,4.05293],[1500854400000,4.05293],[1500940800000,4.04489],[1501027200000,4.06418],[1501113600000,4.05286],[1501200000000,4.07304],[1501286400000,4.08751],[1501372800000,4.08751],[1501459200000,4.08751]],
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: [[1498867200000, 3.993474],[1498867200000, 3.993474],[1498953600000, 3.993474],[1499040000000, 3.993474],[1499126400000, 3.974011],[1499212800000, 3.971858],[1499299200000, 3.978886],[1499385600000, 3.989520],[1499472000000, 3.993144],[1499558400000, 3.993144],[1499644800000, 3.993144],[1499731200000, 3.981787],[1499817600000, 3.983202],[1499904000000, 3.988911],[1499990400000, 3.986767],[1500076800000, 3.993701],[1500163200000, 3.993701],[1500249600000, 3.993701],[1500336000000, 4.002000],[1500422400000, 4.028761],[1500508800000, 4.023365],[1500595200000, 4.004288],[1500681600000, 4.052929],[1500768000000, 4.052929],[1500854400000, 4.052929],[1500940800000, 4.044888],[1501027200000, 4.064180],[1501113600000, 4.052863],[1501200000000, 4.073044],[1501286400000, 4.087515],[1501372800000, 4.087515],[1501459200000, 4.087515]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});