$(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: 'Курс AZN, грн'},
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: 'Курс AZN',
data: [[1159660800000,5.76484],[1159747200000,5.76484],[1159833600000,5.76616],[1159920000000,5.76616],[1160006400000,5.76813],[1160092800000,5.77011],[1160179200000,5.77011],[1160265600000,5.77011],[1160352000000,5.77011],[1160438400000,5.77209],[1160524800000,5.77341],[1160611200000,5.77407],[1160697600000,5.77605],[1160784000000,5.77605],[1160870400000,5.77605],[1160956800000,5.77605],[1161043200000,5.77671],[1161129600000,5.77935],[1161216000000,5.77935],[1161302400000,5.78068],[1161388800000,5.78068],[1161475200000,5.78068],[1161561600000,5.78068],[1161648000000,5.78068],[1161734400000,5.78068],[1161820800000,5.782],[1161907200000,5.782],[1161993600000,5.78134],[1162080000000,5.78134],[1162166400000,5.78134],[1162252800000,5.78266]],
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, 5.764840],[1159660800000, 5.764840],[1159747200000, 5.764840],[1159833600000, 5.766157],[1159920000000, 5.766157],[1160006400000, 5.768132],[1160092800000, 5.770110],[1160179200000, 5.770110],[1160265600000, 5.770110],[1160352000000, 5.770110],[1160438400000, 5.772088],[1160524800000, 5.773408],[1160611200000, 5.774068],[1160697600000, 5.776049],[1160784000000, 5.776049],[1160870400000, 5.776049],[1160956800000, 5.776049],[1161043200000, 5.776710],[1161129600000, 5.779355],[1161216000000, 5.779355],[1161302400000, 5.780678],[1161388800000, 5.780678],[1161475200000, 5.780678],[1161561600000, 5.780678],[1161648000000, 5.780678],[1161734400000, 5.780678],[1161820800000, 5.782001],[1161907200000, 5.782001],[1161993600000, 5.781339],[1162080000000, 5.781339],[1162166400000, 5.781339],[1162252800000, 5.782663]],
tooltip: {valueSuffix: ' грн'},
type: 'spline',
step: false,
color: '#0000CC',
threshold: null
}]
});
});