Radar
A radar chart compares several measures at once: each measure is a spoke, and each series a shape through its values. Products against each other, or a day's rhythm around the clock.
Against the average
One RadarSeries per laptop, with the measures as XValue. Spokes start at the top and go clockwise;
the radius is a value scale from zero shared by all spokes, fixed here with the y axis Max. Hover a spoke to compare
every laptop's score on it. The older laptop's display was not tested, so its shape is open there instead of dropping to the
center.
Code
<RioChart TItem="LaptopScore" Items="scores" YAxis="new AxisOptions { Max = 100 }">
<RadarSeries Name="New laptop" XValue="s => s.Measure" YValue="s => s.Laptop" />
<RadarSeries Name="Old laptop" XValue="s => s.Measure" YValue="s => s.OldLaptop" />
<RadarSeries Name="Class average" XValue="s => s.Measure" YValue="s => s.Average" />
</RioChart>
@code {
record LaptopScore(string Measure, double Laptop, double OldLaptop, double Average); // NaN: not tested
}Around the clock
Hours as spokes make a 24-hour clock: here a website's visits per hour on weekdays and at the weekend. Weekdays peak in office
hours, weekends in the afternoon. (Set the y axis Min to start the scale above zero when the values sit in a narrow
band.)
Code
<RioChart TItem="HourVisits" Items="hours">
<RadarSeries Name="Weekday" XValue="h => h.Hour" YValue="h => h.Weekday" Format="N0" />
<RadarSeries Name="Weekend" XValue="h => h.Hour" YValue="h => h.Weekend" Format="N0" />
</RioChart>Good to know
- Radar series cannot be mixed with other series types; the others are skipped with a warning.
- With fewer than three categories there is no shape: two values are a line, one a dot.
- Long category names are shortened with "…" (the tooltip shows them in full); names that would overlap are left out.
- Clicks, selection, the legend, highlighting and keyboard navigation work as for line charts.
In JSON definitions
"type": "radar" (also "spider") with the measure as x and the value as y; use
groupBy for one shape per product.