this is the echarts code in my Mini Program. The page has obtained the data and written it to data through setData
now I"d like to ask, how do I write the value in this teamname to the data in echarts?
function initChart(canvas, width, height) {
const chart = echarts.init(canvas, null, {
width: width,
height: height
});
canvas.setChart(chart);
var option = {
radar: {
indicator: [{
text: "",
max: 100
},
{
text: "",
max: 100
},
{
text: "",
max: 100
},
{
text: "",
max: 100
},
{
text: "",
max: 100
}
],
center: ["50%", "50%"],
radius: "50%",
startAngle: 90,
splitNumber: 0,
shape: "polygon",
name: {
formatter: "{value}",
textStyle: {
color: "-sharp72ACD1"
}
},
splitArea: {
areaStyle: {
color: ["-sharpD3D3D3"]
}
},
axisLine: {
lineStyle: {
color: "rgba(255, 255, 255, 0.4)"
}
}
},
series: [{
type: "radar",
data: [],
itemStyle: {
normal: {
areaStyle: {
type: "default",
color: "-sharpEA6A69",
opacity: 0.5
}
}
},
}]
}
chart.setOption(option);
return chart;
}