Highcharts.chart('container', {
chart: {
type: 'bar',
marginLeft: 150
},
title: {
text: 'Most popular ideas by April 2016'
},
subtitle: {
text: 'Source: <a href="https://highcharts.uservoice.com/forums/55896-highcharts-javascript-api">UserVoice</a>'
},
xAxis: {
type: 'category',
title: {
text: null
},
min: 0,
max: 4,
scrollbar: {
enabled: true
},
tickLength: 0,
categories: ['Gantt chart',
'Autocalculation and plotting of trend lines',
'Allow navigator to have multiple data series',
'Implement dynamic font size',
'Multiple axis alignment control',
'Stacked area (spline etc) in irregular datetime series',
'Adapt chart height to legend height',
'Export charts in excel sheet',
'Toggle legend box',
'Venn Diagram',
'Add ability to change Rangeselector position',
'Draggable legend box',
'Sankey Diagram',
'Add Navigation bar for Y-Axis in Highstock',
'Grouped x-axis',
'ReactJS plugin',
'3D surface charts',
'Draw lines over a stock chart',
'Data module for database tables',
'Draggable points',
'Gantt chart',
'Autocalculation and plotting of trend lines',
'Allow navigator to have multiple data series',
'Implement dynamic font size',
'Multiple axis alignment control',
'Stacked area (spline etc) in irregular datetime series',
'Adapt chart height to legend height',
'Export charts in excel sheet',
'Toggle legend box',
'Venn Diagram',
'Add ability to change Rangeselector position',
'Draggable legend box',
'Sankey Diagram',
'Add Navigation bar for Y-Axis in Highstock',
'Grouped x-axis',
'ReactJS plugin',
'3D surface charts',
'Draw lines over a stock chart',
'Data module for database tables',
'Draggable points',
'Draggable legend box',
'Sankey Diagram',
'Add Navigation bar for Y-Axis in Highstock',
'Grouped x-axis',
'ReactJS plugin',
'3D surface charts',
'Draw lines over a stock chart',
'Data module for database tables',
'Draggable points',
'Draggable legend box',
'Sankey Diagram',
'Add Navigation bar for Y-Axis in Highstock',
'Grouped x-axis',
'ReactJS plugin',
'3D surface charts',
'Draw lines over a stock chart',
'Data module for database tables',
'Draggable points'
]
},
yAxis: {
min: 0,
max: 1200,
title: {
text: 'Votes',
align: 'high'
}
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
enabled: false
},
credits: {
enabled: false
},
series: [{
name: 'Votes',
data: [
1000,
575,
523,
427,
399,
309,
278,
239,
235,
203,
182,
157,
149,
144,
143,
137,
134,
118,
118,
117,
1000,
575,
523,
427,
399,
309,
278,
239,
235,
203,
182,
157,
149,
144,
143,
137,
134,
118,
118,
117,
157,
149,
144,
143,
137,
134,
118,
118,
117,
157,
149,
144,
143,
137,
134,
118,
118,
117
]
}]
});
<div id="container" style="height: 1000px; min-width: 320px; max-width: 600px; margin: 0 auto"></div>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>