Charts
TwContourChart
TwContourChart is a Blazor contour plot that joins the places where a measured surface has the same value, like height lines on a map.
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
TwContourChart draws contour lines over a surface estimated from scattered samples. Give each ChartPoint its position as X and Y and its measurement as Size. A stronger line marks a higher value, and each sample is drawn as a dot.Levels
Levels sets how many lines are drawn, from 2 to 10, spaced evenly between the lowest and highest measurement. More lines show the slope in more detail: where they bunch together the surface is steep.RAZOR
<div class="grid gap-8 md:grid-cols-2">
<TwChart Title="Three levels">
<TwContourChart Series="@_temperatures" Levels="3" XTitle="East" YTitle="North" Height="ChartHeight.Small" />
</TwChart>
<TwChart Title="Nine levels">
<TwContourChart Series="@_temperatures" Levels="9" XTitle="East" YTitle="North" Height="ChartHeight.Small" />
</TwChart>
</div>Two peaks
Closed rings mark a peak or a hollow. This survey has two hills with a saddle between them. Name the samples with
Label to title their tooltips.When to use
Use a contour plot for a measurement that varies smoothly across two dimensions. The surface between samples is estimated, so the lines are a guide and the dots are the measurements. Points without a
Size are left out, and at least three samples are needed.Summary
Tooltips and the table view give the position and the value of each sample.