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.
Scriptable
Colors, radii and styles computed per data point: by sign, by threshold, by value or by parity.
Color by sign
A scriptable option is a function of
BitChartScriptableContext evaluated per element - here
BackgroundColorFn turns bars red below zero. The context's Active is set while
building the hover appearance, so one function styles both states.
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 |
|---|---|---|---|---|---|---|---|
| Net change | 12 | -8 | 22 | -4 | 18 | -15 | 9 |
Color by threshold
PointBackgroundColorFn and PointRadiusFn give points of 75 and above a different
color and a larger radius.
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 |
|---|---|---|---|---|---|---|---|
| Score | 60 | 72 | 80 | 68 | 91 | 55 | 84 |
Radius by value
The point radius scales with the value via
PointRadiusFn.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 |
|---|---|---|---|---|---|---|---|
| Volume | 10 | 35 | 22 | 60 | 48 | 80 | 30 |
Style by parity
Alternating point styles chosen per index via
PointStyleFn.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 |
|---|---|---|---|---|---|---|---|
| Signal | 40 | 55 | 48 | 70 | 62 | 80 | 72 |
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.