$(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: 'Курс SGD, грн'},
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: 'Курс SGD',
data: [[1159660800000,3.18455],[1159747200000,3.18455],[1159833600000,3.18259],[1159920000000,3.19294],[1160006400000,3.18472],[1160092800000,3.19052],[1160179200000,3.18746],[1160265600000,3.18746],[1160352000000,3.18746],[1160438400000,3.17591],[1160524800000,3.17473],[1160611200000,3.18126],[1160697600000,3.18206],[1160784000000,3.18993],[1160870400000,3.18993],[1160956800000,3.18993],[1161043200000,3.18874],[1161129600000,3.19425],[1161216000000,3.20606],[1161302400000,3.20758],[1161388800000,3.21255],[1161475200000,3.21255],[1161561600000,3.21255],[1161648000000,3.20484],[1161734400000,3.2049],[1161820800000,3.21113],[1161907200000,3.21902],[1161993600000,3.22877],[1162080000000,3.22877],[1162166400000,3.22877],[1162252800000,3.23449]],
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: [[1159660800000, 3.184549],[1159660800000, 3.184549],[1159747200000, 3.184549],[1159833600000, 3.182594],[1159920000000, 3.192944],[1160006400000, 3.184716],[1160092800000, 3.190517],[1160179200000, 3.187460],[1160265600000, 3.187460],[1160352000000, 3.187460],[1160438400000, 3.175906],[1160524800000, 3.174734],[1160611200000, 3.181264],[1160697600000, 3.182056],[1160784000000, 3.189929],[1160870400000, 3.189929],[1160956800000, 3.189929],[1161043200000, 3.188736],[1161129600000, 3.194253],[1161216000000, 3.206061],[1161302400000, 3.207577],[1161388800000, 3.212549],[1161475200000, 3.212549],[1161561600000, 3.212549],[1161648000000, 3.204842],[1161734400000, 3.204901],[1161820800000, 3.211130],[1161907200000, 3.219025],[1161993600000, 3.228772],[1162080000000, 3.228772],[1162166400000, 3.228772],[1162252800000, 3.234493]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});