A radar is a multi-line layer wrapped around a circle: selector matches one
closed d3.lineRadial()<path> per series, x names the spoke (the
variable) and fill names the series. The trace pans each spoke by its angle
— 12 o'clock centre, 3 o'clock hard right — so a radar sounds like a circle
rather than a row of bars, and nothing extra has to be computed here.
A closed outline is usually drawn by repeating the first vertex at the end.
That repeat is how the polygon closes, not a spoke of its own, so the binder
drops a trailing sample whose x matches the first one — otherwise the chart
announces one spoke more than it has, and the reader walks off the end into
a duplicate.
Binds a D3.js radar (spider) chart to MAIDR.
A radar is a multi-line layer wrapped around a circle:
selectormatches one closedd3.lineRadial()<path>per series,xnames the spoke (the variable) andfillnames the series. The trace pans each spoke by its angle — 12 o'clock centre, 3 o'clock hard right — so a radar sounds like a circle rather than a row of bars, and nothing extra has to be computed here.A closed outline is usually drawn by repeating the first vertex at the end. That repeat is how the polygon closes, not a spoke of its own, so the binder drops a trailing sample whose
xmatches the first one — otherwise the chart announces one spoke more than it has, and the reader walks off the end into a duplicate.