Extras
Chart
Bit.BlazorUI.ExtrasGraphPlot
BitChart renders native SVG computed in C# - no canvas or JavaScript engine - so it works in prerendering and static SSR. A Chart.js-like API (BitChartType + BitChartData + BitChartOptions, or one BitChartConfig) draws line, bar, area, pie, doughnut, polar area, radar, scatter, bubble, mixed and sparkline charts, styled by the bit theme and public --bit-Chart-* CSS variables, with keyboard and screen-reader support and SVG/PNG/CSV export.
Data labels
Values drawn on the data: on and inside bars, formatted on a line, percentages in a doughnut.
Values on the bars
Plugins.DataLabels prints each value on the chart. Anchor picks the point on the
element (tip, middle or baseline) and Align places the label outside, on or inside that point.
Interactive chart. Use the left and right arrow keys to move through a series, the up and down arrow keys to move between series, Home and End for the first and last value, Enter to select, and Escape to leave.
| Series | Jan | Feb | Mar | Apr | May | Jun | Jul |
|---|---|---|---|---|---|---|---|
| Units | 12 | 19 | 14 | 22 | 18 | 25 | 20 |
Inside the bars
Anchor = End with Align = Start puts the label inside the bar; a
BackgroundColor turns it into a pill that stays readable over any fill.
Interactive chart. Use the left and right arrow keys to move through a series, the up and down arrow keys to move between series, Home and End for the first and last value, Enter to select, and Escape to leave.
| Series | Jan | Feb | Mar | Apr | May | Jun | Jul |
|---|---|---|---|---|---|---|---|
| Units | 12 | 19 | 14 | 22 | 18 | 25 | 20 |
Formatted labels on a line
Line, scatter and radar points take labels too.
Formatter shapes the text and
DisplayFn filters which elements get one - here only values above 250.
Interactive chart. Use the left and right arrow keys to move through a series, the up and down arrow keys to move between series, Home and End for the first and last value, Enter to select, and Escape to leave.
| Series | Jan | Feb | Mar | Apr | May | Jun | Jul |
|---|---|---|---|---|---|---|---|
| Visits | 120 | 190 | 260 | 250 | 320 | 300 | 280 |
Percentages in a doughnut
On arcs the anchor moves the label between the ring's inner and outer edge.
FormatterCtx also
receives the dataset and data index, which makes share-of-total labels possible.
Interactive chart. Use the left and right arrow keys to move through a series, the up and down arrow keys to move between series, Home and End for the first and last value, Enter to select, and Escape to leave.
| Series | Direct | Organic | Referral | Social | |
|---|---|---|---|---|---|
| Sessions | 300 | 500 | 180 | 240 | 120 |
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.