Charts
TwViolinPlotChart
TwViolinPlotChart is a Blazor violin plot that shows the full shape of each group's distribution with its median and middle half marked.
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
TwViolinPlotChart draws a mirrored density curve for each ChartSample: wide where values cluster, narrow where they are rare. The bar down the middle spans the middle half of the values and the dot marks the median.Shapes a box plot hides
These two teams have almost the same median and quartiles, so their box plots would look alike. The violins show that one is evenly spread while the other splits into a fast group and a slow group.
Horizontal
Set
Horizontal to list the groups down the side, which suits long names and many groups.RAZOR
<TwChart Title="Exam scores by class">
<TwViolinPlotChart Samples="@_classes" Horizontal="true" />
</TwChart>When to use
Use a violin plot when the shape of each distribution matters. Each violin is drawn to the full width of its slot and ends at the group's lowest and highest values, so compare the shapes, not the widths. For a plain summary use TwBoxPlotChart.
Summary
Tooltips and the table view give the count, minimum, lower quartile, median, upper quartile and maximum of each group.