Class TwChart
- Namespace
- TwBlazor.Components
- Assembly
- TwBlazor.dll
The container for a chart: it frames any chart component (such as TwBarChart or TwLineChart) with a title, a description and a loading state.
public class TwChart : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
- Inheritance
-
TwChart
- Implements
- Inherited Members
Remarks
The container renders a figure whose caption is the title, and the chart inside it is labelled by that
title. Each chart draws its own legend, tooltips and table view, so the container stays the same whichever
chart it holds.
Constructors
TwChart()
public TwChart()
Properties
ChildContent
Gets or sets the chart to display, for example a TwColumnChart.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
Description
Gets or sets a short description shown under the title, for example the unit or the period covered.
[Parameter]
public string? Description { get; set; }
Property Value
Height
Gets or sets the height of the plot area for the charts inside the container.
[Parameter]
public ChartHeight Height { get; set; }
Property Value
Remarks
Default is Medium. A chart can override it with its own Height.
Loading
Gets or sets whether the data is still loading. A placeholder is shown in place of the chart.
[Parameter]
public bool Loading { get; set; }
Property Value
LoadingLabel
Gets or sets the text announced by assistive technology while Loading is set. Defaults to the localized Chart_Loading text ("Loading chart").
[Parameter]
public string? LoadingLabel { get; set; }
Property Value
Title
Gets or sets the title shown above the chart. It also names the chart for assistive technology.
[Parameter]
public string? Title { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder