$(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: [[1243814400000,11.7938],[1243900800000,11.8542],[1243987200000,11.8475],[1244073600000,11.8495],[1244160000000,11.8094],[1244246400000,11.7868],[1244332800000,11.7868],[1244419200000,11.7868],[1244505600000,11.7868],[1244592000000,11.6697],[1244678400000,11.754],[1244764800000,11.7359],[1244851200000,11.7485],[1244937600000,11.7485],[1245024000000,11.7485],[1245110400000,11.6861],[1245196800000,11.7156],[1245283200000,11.7132],[1245369600000,11.7445],[1245456000000,11.7422],[1245542400000,11.7422],[1245628800000,11.7422],[1245715200000,11.7158],[1245801600000,11.7519],[1245888000000,11.8318],[1245974400000,11.755],[1246060800000,11.8347],[1246147200000,11.8347],[1246233600000,11.8347],[1246320000000,11.8347]],
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: [[1243814400000, 11.793818],[1243814400000, 11.793818],[1243900800000, 11.854214],[1243987200000, 11.847467],[1244073600000, 11.849522],[1244160000000, 11.809414],[1244246400000, 11.786794],[1244332800000, 11.786794],[1244419200000, 11.786794],[1244505600000, 11.786794],[1244592000000, 11.669695],[1244678400000, 11.753967],[1244764800000, 11.735887],[1244851200000, 11.748508],[1244937600000, 11.748508],[1245024000000, 11.748508],[1245110400000, 11.686132],[1245196800000, 11.715578],[1245283200000, 11.713249],[1245369600000, 11.744463],[1245456000000, 11.742180],[1245542400000, 11.742180],[1245628800000, 11.742180],[1245715200000, 11.715850],[1245801600000, 11.751890],[1245888000000, 11.831780],[1245974400000, 11.755016],[1246060800000, 11.834748],[1246147200000, 11.834748],[1246233600000, 11.834748],[1246320000000, 11.834748]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});