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.

Customization

The CSS variables, cascading parameters, and Style & Class.

CSS variables

Every default color, the typeface and the tooltip surface read a public --bit-Chart-* variable that falls back to the theme, so one stylesheet rule re-skins all charts. They inherit: set them on :root, an ancestor, or a chart's Style as here. --bit-Chart-series-color-1..10 replace the default palette; a color set in C# still wins for that one chart.
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 2 data series.
SeriesJanFebMarAprMayJunJul
Visitors120190160250220300280
Signups4070559085120110

Cascading parameters

BitParams carries a BitChartParams to every chart under it, so a dashboard sets the type, the shared Options, the size and the look once. It is a default, not an override: the last chart sets its own Type and keeps it.
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.
North
SeriesQ1Q2Q3Q4
North42514860
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.
South
SeriesQ1Q2Q3Q4
South35394652
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.
West
SeriesQ1Q2Q3Q4
West28334138

Style & Class

Class and Style reach the root; Classes and Styles reach each part - the title, subtitle, legend, legend items, plot, tooltip and empty state.
Traffic
First half of the year
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.
Traffic
SeriesJanFebMarAprMayJunJul
Visitors120190160250220300280
Signups4070559085120110

Feedback

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