$(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: 'Курс PLN, грн'},
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: 'Курс PLN',
data: [[1412121600000,3.93209],[1412208000000,3.90213],[1412294400000,3.90312],[1412380800000,3.91397],[1412467200000,3.91397],[1412553600000,3.91397],[1412640000000,3.90929],[1412726400000,3.89355],[1412812800000,3.90209],[1412899200000,3.90062],[1412985600000,3.95807],[1413072000000,3.95807],[1413158400000,3.95807],[1413244800000,3.91296],[1413331200000,3.91763],[1413417600000,3.89683],[1413504000000,3.89827],[1413590400000,3.90472],[1413676800000,3.90472],[1413763200000,3.90472],[1413849600000,3.9244],[1413936000000,3.91735],[1414022400000,3.91781],[1414108800000,3.89103],[1414195200000,3.87959],[1414281600000,3.87959],[1414368000000,3.87959],[1414454400000,3.88161],[1414540800000,3.8878],[1414627200000,3.90184],[1414713600000,3.90466]],
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: [[1412121600000, 3.932092],[1412121600000, 3.932092],[1412208000000, 3.902133],[1412294400000, 3.903119],[1412380800000, 3.913972],[1412467200000, 3.913972],[1412553600000, 3.913972],[1412640000000, 3.909287],[1412726400000, 3.893545],[1412812800000, 3.902085],[1412899200000, 3.900622],[1412985600000, 3.958071],[1413072000000, 3.958071],[1413158400000, 3.958071],[1413244800000, 3.912956],[1413331200000, 3.917634],[1413417600000, 3.896828],[1413504000000, 3.898268],[1413590400000, 3.904723],[1413676800000, 3.904723],[1413763200000, 3.904723],[1413849600000, 3.924401],[1413936000000, 3.917346],[1414022400000, 3.917810],[1414108800000, 3.891032],[1414195200000, 3.879594],[1414281600000, 3.879594],[1414368000000, 3.879594],[1414454400000, 3.881606],[1414540800000, 3.887798],[1414627200000, 3.901844],[1414713600000, 3.904659]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});