$(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: 'Курс EUR, грн'},
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: 'Курс EUR',
data: [[1009843200000,4.66957],[1009929600000,4.66957],[1010016000000,4.78878],[1010102400000,4.74831],[1010188800000,4.74831],[1010275200000,4.74831],[1010361600000,4.74831],[1010448000000,4.74831],[1010534400000,4.73148],[1010620800000,4.7383],[1010707200000,4.73715],[1010793600000,4.73715],[1010880000000,4.73715],[1010966400000,4.73715],[1011052800000,4.74211],[1011139200000,4.74026],[1011225600000,4.68491],[1011312000000,4.68516],[1011398400000,4.68516],[1011484800000,4.68516],[1011571200000,4.68516],[1011657600000,4.70111],[1011744000000,4.69844],[1011830400000,4.71228],[1011916800000,4.60924],[1012003200000,4.60924],[1012089600000,4.60924],[1012176000000,4.60924],[1012262400000,4.56401],[1012348800000,4.59841],[1012435200000,4.59575]],
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: [[1009843200000, 4.669570],[1009843200000, 4.669570],[1009929600000, 4.669570],[1010016000000, 4.788780],[1010102400000, 4.748310],[1010188800000, 4.748310],[1010275200000, 4.748310],[1010361600000, 4.748310],[1010448000000, 4.748310],[1010534400000, 4.731480],[1010620800000, 4.738300],[1010707200000, 4.737150],[1010793600000, 4.737150],[1010880000000, 4.737150],[1010966400000, 4.737150],[1011052800000, 4.742110],[1011139200000, 4.740260],[1011225600000, 4.684910],[1011312000000, 4.685160],[1011398400000, 4.685160],[1011484800000, 4.685160],[1011571200000, 4.685160],[1011657600000, 4.701110],[1011744000000, 4.698440],[1011830400000, 4.712280],[1011916800000, 4.609240],[1012003200000, 4.609240],[1012089600000, 4.609240],[1012176000000, 4.609240],[1012262400000, 4.564010],[1012348800000, 4.598410],[1012435200000, 4.595750]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});