Skip to content

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.
Bar chart with 1 data series.
SeriesJanFebMarAprMayJunJul
Net change12-822-418-159

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.
Line chart with 1 data series.
SeriesJanFebMarAprMayJunJul
Score60728068915584

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.
Line chart with 1 data series.
SeriesJanFebMarAprMayJunJul
Volume10352260488030

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.
Line chart with 1 data series.
SeriesJanFebMarAprMayJunJul
Signal40554870628072

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.