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.

Export

Downloading a chart as SVG, PNG or CSV, or taking the picture or the CSV without downloading anything.

Download the chart

Capture the chart with @ref and call ExportSvgAsync (vector, theme tokens resolved), ExportPngAsync (raster at the pixel ratio you pass, on the chart's own surface so a dark theme exports dark) or ExportCsvAsync (values in the chart's culture, with a byte order mark so non-Latin labels open correctly in spreadsheets).
Revenue by product
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.
Revenue by product
SeriesJanFebMarAprMayJunJul
Product A12191422182520
Product B811179141219
Product C5791281014

The CSV without downloading it

ToCsv() returns the CSV export's text without downloading it. Value datasets become one row per series with a column per label; scatter and bubble datasets one row per point.
Revenue by product
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.
Revenue by product
SeriesJanFebMarAprMayJunJul
202565598081565572
202628484060869278

The picture without downloading it

ToSvgStringAsync() returns the SVG download's standalone markup and ToBase64ImageAsync() its raster picture as a data: URL, without touching the file system - e.g. for an img tag, as below.
Traffic by source
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 by source
SeriesDirectOrganicReferralSocialEmail
Sessions300500180240120

Feedback

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