Home › forums › Using CanvasJS › what kind of graph should be used for this use case › Reply To: what kind of graph should be used for this use case
Thanks for helping out! Can you please tell us how to remove the spacing between the columns in the column chart?
Okay – found the answer – posting here for others that might wonder how to do this.
It looks like it may be done by setting the dataPointWidth https://canvasjs.com/docs/charts/chart-options/datapoint-width/. However, to calculate the dataPointWidth for achieving zero spacing between columns, we might need the total width of the chart, and then we can divide by the number of data points we have (number of columns).
Ok – I see – that can be done by getting the width of the div that contains the chart.