weightPattern property

List<int>? weightPattern
final

Sets the series weight pattern. This is a pattern of weights used to calculate the width of bars within a bar group. If not specified, each bar in the group will have an equal width.

The pattern will not repeat. If more series are assigned to the renderer than there are segments in the weight pattern, an error will be thrown.

e.g. For the pattern 2, 1, the first bar in a group should be rendered twice as wide as the second bar.

If the expected bar width of the chart is 12px, then the first bar will render at 16px and the second will render at 8px. The default weight pattern of null means that all bars should be the same width, or 12px in this case.

Not used for stacked bars.

Implementation

final List<int>? weightPattern;