| title | Radar chart |
|---|
See the Pen chart.xkcd radar by timqian (@timqian) on CodePen.
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>const radar = new chartXkcd.Radar(svg, {
title: 'Letters in random words', // optional
data: {
labels: ['c', 'h', 'a', 'r', 't'],
datasets: [{
label: 'ccharrrt', // optional
data: [2, 1, 1, 3, 1],
}, {
label: 'chhaart', // optional
data: [1, 2, 2, 1, 1],
}],
},
options: { // optional
showLegend: true,
dotSize: .8,
showLabels: true,
legendPosition: chartXkcd.config.positionType.upRight,
},
});showLabels: display labels near every line (defaultfalse)ticksCount: customize tick numbers you want to see on the main line (default3)dotSize: you can change size of the dots if you want (default1)showLegend: display legend near chart (defaultfalse)legendPosition: specify where you want to place the legend. (defaultchartXkcd.config.positionType.upLeft) Possible values:- up left:
chartXkcd.config.positionType.upLeft - up right:
chartXkcd.config.positionType.upRight - bottom left:
chartXkcd.config.positionType.downLeft - bottom right:
chartXkcd.config.positionType.downRight
- up left:
dataColors: array of colors for different datasetsfontFamily: customize font family used in the chartunxkcdify: disable xkcd effect (defaultfalse)strokeColor: stroke colors (defaultblack)backgroundColor: color for BG (defaultwhite)