$(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: 'Курс CHF, грн'},
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: 'Курс CHF',
data: [[1185926400000,4.19035],[1186012800000,4.19799],[1186099200000,4.18404],[1186185600000,4.19094],[1186272000000,4.19094],[1186358400000,4.19094],[1186444800000,4.25883],[1186531200000,4.23541],[1186617600000,4.23],[1186704000000,4.22727],[1186790400000,4.22536],[1186876800000,4.22536],[1186963200000,4.22536],[1187049600000,4.20505],[1187136000000,4.17968],[1187222400000,4.15393],[1187308800000,4.15257],[1187395200000,4.18238],[1187481600000,4.18238],[1187568000000,4.18238],[1187654400000,4.17918],[1187740800000,4.19839],[1187827200000,4.17881],[1187913600000,4.18311],[1188000000000,4.18311],[1188086400000,4.18311],[1188172800000,4.18311],[1188259200000,4.19594],[1188345600000,4.21625],[1188432000000,4.20504],[1188518400000,4.19037]],
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: [[1185926400000, 4.190347],[1185926400000, 4.190347],[1186012800000, 4.197989],[1186099200000, 4.184041],[1186185600000, 4.190940],[1186272000000, 4.190940],[1186358400000, 4.190940],[1186444800000, 4.258828],[1186531200000, 4.235405],[1186617600000, 4.230004],[1186704000000, 4.227270],[1186790400000, 4.225359],[1186876800000, 4.225359],[1186963200000, 4.225359],[1187049600000, 4.205048],[1187136000000, 4.179682],[1187222400000, 4.153928],[1187308800000, 4.152573],[1187395200000, 4.182376],[1187481600000, 4.182376],[1187568000000, 4.182376],[1187654400000, 4.179182],[1187740800000, 4.198387],[1187827200000, 4.178808],[1187913600000, 4.183115],[1188000000000, 4.183115],[1188086400000, 4.183115],[1188172800000, 4.183115],[1188259200000, 4.195942],[1188345600000, 4.216253],[1188432000000, 4.205043],[1188518400000, 4.190373]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});