Skip to content

Bar

Reference

Bar elements are used to represent the bars in a bar chart.

Namespace: options.elements.bar

1
2
3
.Options(o => o
    .Elements(e => e
        .Bar().BorderWidth(1).BorderSkipped(false)))

Base Element Settings

BackgroundColor

Fill color.

.BackgroundColor("blue")

BorderWidth

Stroke width.

.BorderWidth(1)

BorderColor

Stroke color.

.BorderColor("grey")

Bar Element Settings

BorderSkipped

Skipped (excluded) border. Default is 'start'

.BorderSkipped(true)
.BorderSkipped(Skipped.Middle)

BorderRadius

The bar border radius (in pixels). Default 0

.BorderRadius(3)
The bar border radius (in pixels). { topLeft, topRight, bottomLeft, bottomRight }
.BorderRadius(br => br.TopLeft(2).TopRight(3).BottomLeft(2).BottomRight(3))

InflateAmount

The amount of pixels to inflate the bar rectangle(s) when drawing is 'auto'.

.InflateAmount()
The amount of pixels to inflate the bar rectangle(s) when drawing.
.InflateAmount(1)

PointStyle

Style of the point for legend. Default is 'circle'.

.PointStyle(PointStyle.Star)