JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 300px"></div>
JavaScript
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
}, function(chart){
var width;
console.log(chart.series);
$.each(chart.series[0].data, function(i, point){
console.log(point);
//width = Math.random() * 20|0 + 5;
if (typeof point.series.points[i-1] != "undefined"){
width = point.plotX - point.series.points[i-1].plotX;
}else{
width = point.series.points[i+1].plotX - point.plotX;
}
point.graphic.attr('width', width);
});
});