$(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: [[1122854400000,0.17636],[1122940800000,0.1766],[1123027200000,0.17668],[1123113600000,0.17655],[1123200000000,0.17728],[1123286400000,null],[1123372800000,null],[1123459200000,null],[1123545600000,null],[1123632000000,0.17795],[1123718400000,0.17786],[1123804800000,0.17795],[1123891200000,0.17837],[1123977600000,0.17837],[1124064000000,0.17837],[1124150400000,0.17793],[1124236800000,0.17772],[1124323200000,0.17736],[1124409600000,0.17723],[1124496000000,0.17657],[1124582400000,0.17657],[1124668800000,0.17657],[1124755200000,0.17666],[1124841600000,0.17689],[1124928000000,0.17689],[1125014400000,0.17746],[1125100800000,0.1775],[1125187200000,0.1775],[1125273600000,0.1775],[1125360000000,0.17759],[1125446400000,0.17691]],
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: [[1122854400000, 0.176360],[1122854400000, 0.176360],[1122940800000, 0.176600],[1123027200000, 0.176680],[1123113600000, 0.176550],[1123200000000, 0.177280],[1123632000000, 0.177950],[1123718400000, 0.177860],[1123804800000, 0.177950],[1123891200000, 0.178370],[1123977600000, 0.178370],[1124064000000, 0.178370],[1124150400000, 0.177930],[1124236800000, 0.177720],[1124323200000, 0.177360],[1124409600000, 0.177230],[1124496000000, 0.176570],[1124582400000, 0.176570],[1124668800000, 0.176570],[1124755200000, 0.176660],[1124841600000, 0.176890],[1124928000000, 0.176890],[1125014400000, 0.177460],[1125100800000, 0.177500],[1125187200000, 0.177500],[1125273600000, 0.177500],[1125360000000, 0.177590],[1125446400000, 0.176910]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});