API / Series/Bar-Y / BarYSeries
Defined in: src/core/types/chart/bar-y.ts:51
Extends
Type Parameters
| Type Parameter | Default type |
|---|---|
T |
MeaningfulAny |
Properties
| Property | Type | Description |
|---|---|---|
barMaxWidth? |
number |
Maximum bar thickness in pixels. Must be a finite number greater than or equal to 1. Inherits series.options['bar-y'].barMaxWidth (default 50). Stacks use the smallest resolved limit, including hidden series. Applied after barPadding; the minimum rendered thickness is 1 pixel. Minimum 1 |
barPadding? |
number |
Padding as a fraction of the allocated bar slot. Larger values make thinner bars, centered in the same slot. Must be a finite number in [0, 1]. Inherits series.options['bar-y'].barPadding (default 0.2). Stacks use the largest resolved padding among all their series, including hidden ones. Padding is applied before barMaxWidth and minimum thickness limits. Minimum 0 Maximum 1 |
borderColor? |
string |
The color of the border surrounding each bar. |
borderRadius? |
number |
The corner radius of the border surrounding each bar. Default 0 |
borderWidth? |
number |
The width of the border surrounding each bar. Default 0 |
color? |
string |
The main color of the series (hex, rgba) |
cursor? |
string |
You can set the cursor to "pointer" if you have click events attached to the series, to signal to the user that the points and lines can be clicked. |
custom? |
any |
A reserved subspace to store options and values for customized functionality Here you can add additional data for your own event callbacks and formatter callbacks |
data |
BarYSeriesData<T>[] |
- |
dataLabels? |
Omit<BaseDataLabels, "format"> & BarSeriesDataLabelPlacementOptions & object |
Options for the series data labels, appearing next to each data point. |
grouping? |
boolean |
Whether to place bars or stacks side by side. When false, bars share the category center without taking up grouped slots. Stacking within each stackId is preserved; non-stacked bars start at the value-axis baseline. All series in the same stack must use the same grouping value; omitted grouping means true. Set false on all series in a stack to overlay the whole stack. Later series cover earlier ones, including their borders. Default true |
legend? |
BaseSeriesLegend & object |
Individual series legend options. Has higher priority than legend options in widget data |
name |
string |
The name of the series (used in legend, tooltip etc) |
nullMode? |
"skip" | "zero" |
Specifies how null or undefined values should be handled in the series. - 'skip': Omit data points with null values (no bar shown) - 'zero': Treat null values as zero Default 'skip' |
opacity? |
null | number |
Opacity of the bar fill and border. Does not affect normal data labels. Point opacity takes precedence. Omitted or null values inherit series.options['bar-y'].opacity (default 1). The inactive state's opacity multiplies the resolved bar opacity. Minimum 0 Maximum 1 |
stackId? |
string |
This option allows grouping series in a stacked chart |
stacking? |
"percent" | "normal" |
Whether to stack the values of each series on top of each other. Possible values are undefined to disable, "normal" to stack by value or "percent" Percent stacking supports only non-negative values. |
stackLabels? |
StackLabelsOptions<T> |
Override plugin stack label options. Only enabled series contribute to totals. |
tooltip? |
Omit<{ enabled: boolean; valueFormat: ValueFormat<CustomFormatContext>; }, "valueFormat"> & object |
Options for the tooltip that appears when the user hovers over a series or point. |
type |
"bar-y" |
Bar-Y series: horizontal bars for values along the Y axis. |
visible? |
boolean |
Initial visibility of the series |
Previous
Next