44 lines
1.1 KiB
Markdown
44 lines
1.1 KiB
Markdown
````md
|
|
::: chartjs 雷达图案例
|
|
```json
|
|
{
|
|
"type": "radar",
|
|
"data": {
|
|
"labels": ["吃饭", "喝水", "睡觉", "设计", "编程", "骑车", "跑步"],
|
|
"datasets": [
|
|
{
|
|
"label": "我的第一个数据集",
|
|
"data": [65, 59, 90, 81, 56, 55, 40],
|
|
"fill": true,
|
|
"backgroundColor": "rgba(255, 99, 132, 0.2)",
|
|
"borderColor": "rgb(255, 99, 132)",
|
|
"pointBackgroundColor": "rgb(255, 99, 132)",
|
|
"pointBorderColor": "#fff",
|
|
"pointHoverBackgroundColor": "#fff",
|
|
"pointHoverBorderColor": "rgb(255, 99, 132)"
|
|
},
|
|
{
|
|
"label": "我的第二个数据集",
|
|
"data": [28, 48, 40, 19, 96, 27, 100],
|
|
"fill": true,
|
|
"backgroundColor": "rgba(54, 162, 235, 0.2)",
|
|
"borderColor": "rgb(54, 162, 235)",
|
|
"pointBackgroundColor": "rgb(54, 162, 235)",
|
|
"pointBorderColor": "#fff",
|
|
"pointHoverBackgroundColor": "#fff",
|
|
"pointHoverBorderColor": "rgb(54, 162, 235)"
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"elements": {
|
|
"line": {
|
|
"borderWidth": 3
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
:::
|
|
````
|