$(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: [[1070236800000,6.3952],[1070323200000,6.40853],[1070409600000,6.38507],[1070496000000,6.45279],[1070582400000,6.44479],[1070668800000,6.44479],[1070755200000,6.44479],[1070841600000,6.44479],[1070928000000,6.51464],[1071014400000,6.53597],[1071100800000,6.52571],[1071187200000,6.53371],[1071273600000,6.53371],[1071360000000,6.53371],[1071446400000,6.53371],[1071532800000,6.52079],[1071619200000,6.57784],[1071705600000,6.57784],[1071792000000,6.6209],[1071878400000,6.6209],[1071964800000,6.6209],[1072051200000,6.6209],[1072137600000,6.62931],[1072224000000,6.60692],[1072310400000,6.61479],[1072396800000,6.61479],[1072483200000,6.61479],[1072569600000,6.61479],[1072656000000,6.61479],[1072742400000,6.66384],[1072828800000,6.73368]],
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: [[1070236800000, 6.395200],[1070236800000, 6.395200],[1070323200000, 6.408530],[1070409600000, 6.385070],[1070496000000, 6.452790],[1070582400000, 6.444790],[1070668800000, 6.444790],[1070755200000, 6.444790],[1070841600000, 6.444790],[1070928000000, 6.514640],[1071014400000, 6.535970],[1071100800000, 6.525710],[1071187200000, 6.533710],[1071273600000, 6.533710],[1071360000000, 6.533710],[1071446400000, 6.533710],[1071532800000, 6.520790],[1071619200000, 6.577840],[1071705600000, 6.577840],[1071792000000, 6.620900],[1071878400000, 6.620900],[1071964800000, 6.620900],[1072051200000, 6.620900],[1072137600000, 6.629310],[1072224000000, 6.606920],[1072310400000, 6.614790],[1072396800000, 6.614790],[1072483200000, 6.614790],[1072569600000, 6.614790],[1072656000000, 6.614790],[1072742400000, 6.663840],[1072828800000, 6.733680]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});