Forum Longevity - stacked
by Adam Nekola
HTML
<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: 400px; height: 600px; margin: 0 auto"></div>
JavaScript
$(function () {
var hc_options = {
chart: {
renderTo: 'container',
type: 'bar',
events: {
load: function () {
var ren = this.renderer,
colors = Highcharts.getOptions().colors,
chart = $('#container').highcharts(),
medians = chart.get('medians'),
yourgroup = chart.get('4');
yourgroup.select();
}
}
},
colors: [
'#ccc',
'#00557E',
'#0090C0',
'#71B2D6',
'#9DC7E1'
],
title: {
text: ''
},
subtitle: {
text: ''
},
xAxis: {
categories: ['U.S. Adults', 'Men', 'Women', '18-29', '30-39', '40-49', '50-59', '60-69', '70+', 'White, non-H', 'Black, non-H', 'Hispanic'],
plotBands: [{
color: '#eeece4',
from: 0.5,
to: 2.5
},{
color: '#eeece4',
from: 8.5,
to: 11.5
}],
title: {
text: null
},
tickLength: 0,
labels: {
style: {
fontSize: '14px',
fontFamily: '"franklin-gothic-urw", Verdana, Geneva, sans-serif'
}
}
},
yAxis: [{
min: 0,
max: 105,
endOnTick: false,
gridLineDashStyle: 'shortDot',
title: {
text: null
},
labels: {
overflow: 'justify',
style: {
fontFamily: '"franklin-gothic-urw", Verdana, Geneva,...