equalBarWidth

Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing.

Type:

Object

|

Boolean

Default Value: true

If some values for a series are set to zero or not specified, bars that represent these values will be missing from the chart. To fill the empty area by extending the width of the neighboring bars, set the equalBarWidth property to false. The bars will have different widths, but there will be no empty areas.

To set a custom width for bars, as well as the spacing between bars, assign an object to this property and specify the width and spacing properties of this object.

NOTE
If the widget's container is not large enough to contain bars of the specified width along with the specified spacing between them, the spacing will be ignored.

View Demo

Show Example:
jQuery

Use the check box at the bottom to switch the value of the equalBarWidth option.


                                    

                                    

spacing

Specifies the spacing between bars in pixels.

Type:

Number

Default Value: undefined

BarsSpacing ChartJS

width

Specifies an equal bar width in pixels.

Type:

Number

Default Value: undefined
Show Example:
jQuery

In this example, bars are displayed with an equal width. The width is set to 20.