Skip to content
On this page

Charts > Radar Chart ​

A radar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart, with three or more quantitative variables represented on axes starting from the same point.

The Chart ​

Value:

Download example CSV
Copy HTML

Playground ​

Data

Number of shapes
Number of axes
Number of lines on each axis

Animation

Total time of animation in ms

Style

Color for each shape
Fill opacity of shape
Show values in axis labels

Usage Example (with tooltip) ​

vue
<template>
  <RadarChart :data="data" @hover="setTooltip" />

  <OTTooltip :info="tooltip">
    <div class="">
      <p class=" my-0">
        <span class="font-semibold">Value: </span>{{ tooltip?.data?.value }}
      </p>
    </div>
  </OTTooltip>
</template>

<script setup>
import useTooltip from "@/functions/useTooltip.js";

const [tooltip, setTooltip] = useTooltip();
</script>

Component API ​

The radar chart is built with SVG and d3. The shape animates using d3 transition.

Data ​

js
[
 { name: "Axis 1", value: 10 },
 { name: "Axis 2", value: 30 },
 ...
]<

Props ​

NameDefaultDescriptionType
numShapes1The number of shapes we wantNumber
data"[]"The datasetArray
levels"[10, 20, 30, 40, 50]"The values for the grid linesArray
gridColor"#D1D5DB"The color for the background gridString
shapeColors"#D61355,#30E3DF,#68B984"The colors for the shapesString
margin20The margin around the chartNumber
labelColor"#4B5563"The text color for labelsString
labelFactor1.2The higher the value, the more distance between chart and labelsNumber
opacity0The opacity of the shapesNumber
unit""The unit for axis labelsString
rotation0The rotation of the chart in radiansNumber
showValuesfalseWhether or not to show the value of each axis next to the nameBoolean

Dependencies ​

  • d3