# Radar chart

Source: https://ecosphere.dev/docs/charts/radar-chart (Ecosphere 1.5). Install `vue-ecosphere` for Vue 3 or `react-ecosphere` for React 18.2+/19: same components, props, markup and stylesheet.

A profile across a handful of measures on one scale: a web of rings and spokes, each series a 2px outline over a 14% wash.

`import { EcoRadarChart } from "vue-ecosphere"`

## Two shapes

It answers “what is this profile” and “how has it shifted”, never “which measure is largest”.

Vue (vue-ecosphere):

```vue
<EcoRadarChart
  :axes="['Speed', 'Accuracy', 'Coverage', 'Cost', 'Support', 'Uptime']"
  :series="[
    { name: 'This quarter', values: [82, 74, 64, 58, 88, 92] },
    { name: 'Last quarter', values: [66, 70, 52, 64, 72, 86] },
  ]"
  title="Service profile"
  subtitle="Six measures, each scored out of 100"
/>
```

React (react-ecosphere):

```tsx
<EcoRadarChart
  axes={["Speed", "Accuracy", "Coverage", "Cost", "Support", "Uptime"]}
  series={[
    { name: "This quarter", values: [82, 74, 64, 58, 88, 92] },
    { name: "Last quarter", values: [66, 70, 52, 64, 72, 86] },
  ]}
  title="Service profile"
  subtitle="Six measures, each scored out of 100"
/>
```

## One shape

One shape is easier to read than two; a third turns it into a tangle.

Vue (vue-ecosphere):

```vue
<EcoRadarChart :axes="axes" :series="[thisQuarter]" :size="240" title="This quarter" />
```

React (react-ecosphere):

```tsx
<EcoRadarChart axes={axes} series={[thisQuarter]} size={240} title="This quarter" />
```

## API

Vue (vue-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `axes` | `string[]` | — | Five to seven measures, clockwise from twelve o'clock. Keep the order fixed between charts. |
| `series` | `RadarSeries[]` | — | One or two shapes on the shared scale; higher is better on every axis. |
| `max` | `number` | 100 | Top of the shared scale. |
| `size` | `number` | 260 | viewBox size; the web's radius is half of it less 38. |
| `rings` | `number` | 4 | Rings on the web. |
| `legendValue` | `(s: RadarSeries) => string` | mean score | The figure beside each legend label. |
| `title / subtitle / caption / ariaLabel` | `string` | — | Head and the svg label; every score is appended to the label. |

React (react-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `axes` | `string[]` | — | Five to seven measures, clockwise from twelve o'clock. Keep the order fixed between charts. |
| `series` | `RadarSeries[]` | — | One or two shapes on the shared scale; higher is better on every axis. |
| `max` | `number` | 100 | Top of the shared scale. |
| `size` | `number` | 260 | viewBox size; the web's radius is half of it less 38. |
| `rings` | `number` | 4 | Rings on the web. |
| `legendValue` | `(s: RadarSeries) => string` | mean score | The figure beside each legend label. |
| `title / subtitle / caption / ariaLabel` | `string` | — | Head and the svg label; every score is appended to the label. |
