$(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: 'Курс RUB, грн'},
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: 'Курс RUB',
data: [[973036800000,0.19543],[973123200000,0.19515],[973209600000,0.1953],[973296000000,0.19551],[973382400000,0.19551],[973468800000,0.19551],[973555200000,0.1955],[973641600000,0.19552],[973728000000,0.19566],[973814400000,0.19615],[973900800000,0.19572],[973987200000,0.19572],[974073600000,0.19572],[974160000000,0.19579],[974246400000,0.1963],[974332800000,0.19651],[974419200000,0.19587],[974505600000,0.19551],[974592000000,0.19551],[974678400000,0.19551],[974764800000,0.19537],[974851200000,0.19536],[974937600000,0.19522],[975024000000,0.19522],[975110400000,0.19501],[975196800000,0.19501],[975283200000,0.19501],[975369600000,0.19515],[975456000000,0.19514],[975542400000,0.19521]],
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, 0.195430],[973036800000, 0.195430],[973123200000, 0.195150],[973209600000, 0.195300],[973296000000, 0.195510],[973382400000, 0.195510],[973468800000, 0.195510],[973555200000, 0.195500],[973641600000, 0.195520],[973728000000, 0.195660],[973814400000, 0.196150],[973900800000, 0.195720],[973987200000, 0.195720],[974073600000, 0.195720],[974160000000, 0.195790],[974246400000, 0.196300],[974332800000, 0.196510],[974419200000, 0.195870],[974505600000, 0.195510],[974592000000, 0.195510],[974678400000, 0.195510],[974764800000, 0.195370],[974851200000, 0.195360],[974937600000, 0.195220],[975024000000, 0.195220],[975110400000, 0.195010],[975196800000, 0.195010],[975283200000, 0.195010],[975369600000, 0.195150],[975456000000, 0.195140],[975542400000, 0.195210]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});