Charts
TwScatterChart
TwScatterChart is a Blazor scatter plot that positions points by two values. Also draws bubble charts and connected scatter plots.
Last updated
Please be aware this component is new, may have bugs and/or be subject to change. Please report any bugs at
https://github.com/twblazor/twblazor/issues.
Basic usage
TwScatterChart positions points by two numeric values to show how they relate. Pass one or more ChartPointSeries, each a named list of ChartPoint. XTitle and YTitle label the axes and name the values in tooltips and the table view.Bubble chart
Give points a
Size and each is drawn as a bubble whose area follows it, adding a third value. SizeTitle names it.Point labels
Set
ShowLabels to print each point's Label beside it.RAZOR
<TwChart Title="Price against rating">
<TwScatterChart Series="@_products" XTitle="Price" YTitle="Rating" ShowLabels="true" />
</TwChart>Connected scatter plot
Set
Connect to join the points of each series in order, tracing a path through two variables over time.Colors
Any two points can sit side by side, so keep to three series or fewer for colors that stay easy to tell apart.
Summary
Tooltips and the table view give the X and Y values of each point, and its size when it has one.