Highcharts Stock Demo
author(s): Torstein Hønsi
by Ea Bangalore
HTML
<div id="container" style="width: 300px;min-height:200px;height:434px;"></div>
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
JavaScript
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: false
},
tickLength: 0
},
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: [
["Gantt chart", 125000],
["Autocalculation and plotting of trend lines", 1421],
["Allow navigator to have multiple data series", 523],
],dataLabels: { enabled: true,color: '#333',crop: false,overflow:"none",inside:false, x:-5}
}]
});