Skip to content

Radar

Draw a radar chart from one row per (series, indicator) pair (#743).

Radar

Usage

from dataviz import radar
from dataviz import save

def main() raises:
    # Criteria use their natural units and different maxima; higher is
    # better on every axis.
    var indicators: List[String] = [
        "Reliability / 10", "Integrations", "Regions", "Support / 5", "Security / 10",
    ]
    var max_values: List[Float64] = [10.0, 200.0, 12.0, 5.0, 10.0]
    var series_names: List[String] = ["Atlas", "Beacon", "Comet"]
    var series_values: List[List[Float64]] = [
        [9.5, 160.0, 8.0, 3.8, 7.0],
        [8.0, 110.0, 12.0, 4.8, 8.0],
        [9.0, 185.0, 6.0, 4.0, 10.0],
    ]

    var c = radar(
        indicators,
        max_values,
        series_names,
        series_values,
        title="Illustrative Platform Evaluation",
    )
    save(c, "docs/src/examples/out_radar.svg")

See Data shapes for shared input conventions.

Args:

  • df: The frame containing the long-form observations.
  • indicator: String column naming each spoke.
  • series: String column naming each polygon.
  • value: Numeric column with the observed values.
  • max_value: Numeric column with the indicator maxima.
  • grid_rings: Number of concentric web rings.
  • theme: Plot styling and missing-value policy.
  • width: Plot width in pixels.
  • height: Plot height in pixels.
  • title: Chart title.
  • subtitle: Secondary title.
  • x_title: Horizontal axis title.
  • y_title: Vertical axis title.

Related

Related charts: Polar · Gauge

Relevant API: radar