Home Forums Chart Support step area that is centered on data point Reply To: step area that is centered on data point

#34122

@lineseiki,

In case of step-area chart, the step occurs at particular x-value that you pass. You can use column chart with no space between dataPoints – which you can achieve with the help of dataPointWidth property as shown in below code-snippet.

chart.set("dataPointWidth",Math.ceil(chart.axisX[0].bounds.width/chart.data[0].dataPoints.length),true);

$( window ).resize(function() {
	chart.set("dataPointWidth",Math.ceil(chart.axisX[0].bounds.width/chart.data[0].dataPoints.length),true);
});

Please take a look at this JSFiddle for working example.
Histogram Chart using Column Chart


Vishwas R
Team CanvasJS