Skip to content

grafit-charts


Interface: BarSeriesOptions ​

Extends ​

  • SeriesBaseOptions

Properties ​

cornerRadius? ​

optional cornerRadius?: number


direction? ​

optional direction?: "vertical" | "horizontal"


fill? ​

optional fill?: string


fillOpacity? ​

optional fillOpacity?: number


groupGap? ​

optional groupGap?: number

Gap between bars of one category group — fraction of the slot step (0–0.9, default 0.2). Ignored when the series is alone in the band.


id? ​

optional id?: string

Inherited from ​

SeriesBaseOptions.id


itemStyler? ​

optional itemStyler?: Styler<RectItemStylerParams, RectItemStyle>

Style of one bar by its datum — to paint the bars of a series by value. Undefined leaves the bar as the series draws it; a partial style is laid over it. Called for every segment of a stack with the index of the datum in the data of this series. The legend keeps the series color, the tooltip marker takes the bar's.


label? ​

optional label?: Switchable & FontOptions & LabelOverlapOptions & object

Value labels. Outer placements: top/bottom/left/right and corners (top-left, …); center and inner-* are inside the bar (auto-contrast + outline).

Type Declaration ​

formatter? ​

optional formatter?: (params) => string

Parameters ​
params ​
datum ​

Datum

value ​

number

Returns ​

string

placement? ​

optional placement?: RectLabelPlacement


name? ​

optional name?: string

Inherited from ​

SeriesBaseOptions.name


normalizedTo? ​

optional normalizedTo?: number

Normalize the stack to a total (100 — percentage stack); only with stacked.


showInLegend? ​

optional showInLegend?: boolean

Inherited from ​

SeriesBaseOptions.showInLegend


stacked? ​

optional stacked?: boolean


stackGroup? ​

optional stackGroup?: string


stroke? ​

optional stroke?: string


strokeWidth? ​

optional strokeWidth?: number


tooltip? ​

optional tooltip?: Switchable & object

Type Declaration ​

renderer? ​

optional renderer?: (params) => string | TooltipContentData

Parameters ​
params ​

SeriesTooltipRendererParams

Returns ​

string | TooltipContentData

Inherited from ​

SeriesBaseOptions.tooltip


type ​

type: "bar"


visible? ​

optional visible?: boolean

Inherited from ​

SeriesBaseOptions.visible


xField ​

xField: string

Inherited from ​

SeriesBaseOptions.xField


xName? ​

optional xName?: string

Inherited from ​

SeriesBaseOptions.xName


yField ​

yField: string

Inherited from ​

SeriesBaseOptions.yField