Charts
TwIconChart
TwIconChart is a Blazor icon chart and pictogram: values shown as rows of repeated icons, or as one icon sized by each value.
Last updated
Please be aware this component is new, may have bugs and/or be subject to change. Please report any bugs at
https://github.com/twblazor/twblazor/issues.
Basic usage
TwIconChart draws values with any Icon from the library. By default each value becomes a row of repeated icons, a pictogram, and the legend states what one icon stands for.- 1 icon = 5
Unit value
A round amount is chosen so the largest value uses about ten icons. Set
UnitValue to decide what one icon is worth.- 1 icon = 2
RAZOR
<TwChart Title="Team size by office">
<TwIconChart Data="@_offices" Icon="Icon.Person" UnitValue="2" Height="ChartHeight.Small" />
</TwChart>Sized icons
Set
Mode to IconChartMode.Size to draw one icon per value, with its area following the value.RAZOR
<TwChart Title="Team size by office">
<TwIconChart Data="@_offices" Icon="Icon.Person" Mode="IconChartMode.Size" Height="ChartHeight.Small" />
</TwChart>Accessibility
The icons are decorative and hidden from assistive technology. The values are stated by the data points, tooltips and table view.
Summary
Tooltips and the table view give the value of each category.