$(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: [[1222819200000,2.04702],[1222905600000,2.02415],[1222992000000,1.98614],[1223078400000,1.9653],[1223164800000,1.9653],[1223251200000,1.9653],[1223337600000,1.9275],[1223424000000,1.94215],[1223510400000,1.95819],[1223596800000,1.95257],[1223683200000,1.8825],[1223769600000,1.8825],[1223856000000,1.8825],[1223942400000,1.88625],[1224028800000,1.94957],[1224115200000,1.90546],[1224201600000,1.87279],[1224288000000,1.86346],[1224374400000,1.86346],[1224460800000,1.86346],[1224547200000,1.8712],[1224633600000,1.82944],[1224720000000,1.73674],[1224806400000,1.69049],[1224892800000,1.70009],[1224979200000,1.70009],[1225065600000,1.70009],[1225152000000,1.73642],[1225238400000,1.86182],[1225324800000,2.04698],[1225411200000,2.10622]],
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: [[1222819200000, 2.047021],[1222819200000, 2.047021],[1222905600000, 2.024152],[1222992000000, 1.986137],[1223078400000, 1.965302],[1223164800000, 1.965302],[1223251200000, 1.965302],[1223337600000, 1.927499],[1223424000000, 1.942153],[1223510400000, 1.958193],[1223596800000, 1.952573],[1223683200000, 1.882503],[1223769600000, 1.882503],[1223856000000, 1.882503],[1223942400000, 1.886250],[1224028800000, 1.949570],[1224115200000, 1.905456],[1224201600000, 1.872795],[1224288000000, 1.863456],[1224374400000, 1.863456],[1224460800000, 1.863456],[1224547200000, 1.871200],[1224633600000, 1.829437],[1224720000000, 1.736739],[1224806400000, 1.690493],[1224892800000, 1.700094],[1224979200000, 1.700094],[1225065600000, 1.700094],[1225152000000, 1.736416],[1225238400000, 1.861822],[1225324800000, 2.046981],[1225411200000, 2.106222]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});