Table of Contents

Class TwBarChartBase

Namespace
TwBlazor.Components
Assembly
TwBlazor.dll

The shared definition of TwBarChart and TwColumnChart, which differ only in direction.

public abstract class TwBarChartBase : TwCategoryChartBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent, IAsyncDisposable
Inheritance
TwBarChartBase
Implements
Derived
Inherited Members

Constructors

TwBarChartBase()

protected TwBarChartBase()

Properties

ShowValues

Gets or sets whether each bar is labelled with its value. Ignored when Stacking is on.

[Parameter]
public bool ShowValues { get; set; }

Property Value

bool

Remarks

Default is false. Best kept for charts with few bars; the axis and tooltips carry the values otherwise.

Stacking

Gets or sets how multiple series share a category: side by side, stacked, or stacked to 100%.

[Parameter]
public ChartStacking Stacking { get; set; }

Property Value

ChartStacking

Remarks

Default is None, which draws a grouped chart. Negative values stack downwards from the baseline, which makes a diverging chart.

Methods

BuildMarks(ChartSceneBuilder, IReadOnlyList<ChartSeriesSlot>)

Adds the marks, data points and axes for the visible series.

protected override void BuildMarks(ChartSceneBuilder builder, IReadOnlyList<ChartSeriesSlot> series)

Parameters

builder ChartSceneBuilder

The builder that collects the scene.

series IReadOnlyList<ChartSeriesSlot>

The series the reader has not hidden. Never empty.