$(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: [[1277942400000,7.30301],[1278028800000,7.39858],[1278115200000,7.42082],[1278201600000,7.42082],[1278288000000,7.42082],[1278374400000,7.43829],[1278460800000,7.43885],[1278547200000,7.46468],[1278633600000,7.51351],[1278720000000,7.49233],[1278806400000,7.49233],[1278892800000,7.49233],[1278979200000,7.44318],[1279065600000,7.44716],[1279152000000,7.47507],[1279238400000,7.55227],[1279324800000,7.58306],[1279411200000,7.58306],[1279497600000,7.58306],[1279584000000,7.50376],[1279670400000,7.49368],[1279756800000,7.53123],[1279843200000,7.56271],[1279929600000,7.55002],[1280016000000,7.55002],[1280102400000,7.55002],[1280188800000,7.52121],[1280275200000,7.46897],[1280361600000,7.45265],[1280448000000,7.5517],[1280534400000,7.59369]],
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: [[1277942400000, 7.303014],[1277942400000, 7.303014],[1278028800000, 7.398577],[1278115200000, 7.420825],[1278201600000, 7.420825],[1278288000000, 7.420825],[1278374400000, 7.438289],[1278460800000, 7.438852],[1278547200000, 7.464677],[1278633600000, 7.513507],[1278720000000, 7.492335],[1278806400000, 7.492335],[1278892800000, 7.492335],[1278979200000, 7.443182],[1279065600000, 7.447158],[1279152000000, 7.475074],[1279238400000, 7.552270],[1279324800000, 7.583061],[1279411200000, 7.583061],[1279497600000, 7.583061],[1279584000000, 7.503756],[1279670400000, 7.493677],[1279756800000, 7.531227],[1279843200000, 7.562711],[1279929600000, 7.550023],[1280016000000, 7.550023],[1280102400000, 7.550023],[1280188800000, 7.521205],[1280275200000, 7.468973],[1280361600000, 7.452649],[1280448000000, 7.551701],[1280534400000, 7.593686]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});