JSFiddle - React, Tailwind, and code Playground
by valinton
HTML
<link rel="stylesheet" href="http://www.trirand.com/blog/jqgrid/themes/redmond/jquery-ui-custom.css">
<link rel="stylesheet" href="http://www.trirand.com/blog/jqgrid/themes/ui.jqgrid.css">
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
var data_idpl = {
col:['сентябрь 2012','октябрь 2012','ноябрь 2012','декабрь 2012','январь 2013','февраль 2013','март 2013','апрель 2013','май 2013','июнь 2013','июль 2013','август 2013'],
tec:[1950,2000,2050,1900,2030,2060,2100,2130,2160,2180,2200,2220],
srh:[1900,1980,2000,1950,2080,2150,2300,2450,2500,2620,2720,2814]
};
$(function () {
$('#container').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Изменение депозитного портфеля за последние 12 месяцев (экв.млн.грн.)'
},
xAxis: {
categories: data_idpl.col
},
yAxis: {
min: 0,
title: {
text: 'млн.грн'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
tooltip: {
formatter: function() {
return '<b>'+ this.x +'</b><br/>'+
this.series.name +': '+ this.y +'<br/>'+
'всего: '+ this.point.stackTotal;
}
},
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
}
}
},
series: [
{
name: 'срочные',
data: data_idpl.srh
},
{
name: 'текущие',
data: data_idpl.tec
}]
});
});