Home forums Using CanvasJS How to render histograms

This topic contains 2 replies, has 2 voices, and was last updated by  Cristi S. 1 year, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #14684

    Cristi S.

    Histograms have usually no space between their bar/column shapes, like here below (on the right):


    1) How can I set the bar/column shape width to the maximum allowed? I tried with dataPointWidth and dataPointMaxWidth, but it’s not optimum.

    2) Also, how can I remove the left/right padding between the bars/columns and the Y axis, or at the right?



    Vishwas R


    1) By setting dataPointWidth based on axis width and number of dataPoints in column chart, histogram chart can be rendered. Please check this jsfiddle.

    2) You can remove left/right padding between column and axis by setting minimum/maximum.

    Vishwas R
    Team CanvasJS


    Cristi S.

    Thanks, Vish!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.