$(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: 'Курс USD, грн'},
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: 'Курс USD',
data: [[973036800000,5.4369],[973123200000,5.4369],[973209600000,5.4371],[973296000000,5.4371],[973382400000,5.4371],[973468800000,5.4371],[973555200000,5.4369],[973641600000,5.4373],[973728000000,5.4373],[973814400000,5.4373],[973900800000,5.4372],[973987200000,5.4372],[974073600000,5.4372],[974160000000,5.4372],[974246400000,5.4375],[974332800000,5.4374],[974419200000,5.4373],[974505600000,5.4372],[974592000000,5.4372],[974678400000,5.4372],[974764800000,5.4371],[974851200000,5.437],[974937600000,5.4369],[975024000000,5.4369],[975110400000,5.437],[975196800000,5.437],[975283200000,5.437],[975369600000,5.4369],[975456000000,5.4367],[975542400000,5.4367]],
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: [[973036800000, 5.436900],[973036800000, 5.436900],[973123200000, 5.436900],[973209600000, 5.437100],[973296000000, 5.437100],[973382400000, 5.437100],[973468800000, 5.437100],[973555200000, 5.436900],[973641600000, 5.437300],[973728000000, 5.437300],[973814400000, 5.437300],[973900800000, 5.437200],[973987200000, 5.437200],[974073600000, 5.437200],[974160000000, 5.437200],[974246400000, 5.437500],[974332800000, 5.437400],[974419200000, 5.437300],[974505600000, 5.437200],[974592000000, 5.437200],[974678400000, 5.437200],[974764800000, 5.437100],[974851200000, 5.437000],[974937600000, 5.436900],[975024000000, 5.436900],[975110400000, 5.437000],[975196800000, 5.437000],[975283200000, 5.437000],[975369600000, 5.436900],[975456000000, 5.436700],[975542400000, 5.436700]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});