radarChart.init(document.querySelector("#radar0"), {
data: {
maxValue: [100, 100, 100, 100, 100, 200],
value: [80, 50, 30, 50, 100, 68],
description: ["JavaScript", "Java", "CSS", "Python", "Three.js", "Canvas"]
},
config: {
scale: 0.5,
dataFill: {
fillStyle: "rgba(24, 236, 111, .4)"
},
bg: {
layer: 4,
evenFillStyle: "#828282",
oddFillStyle: "#828282",
evenStrokeStyle: "#ccc",
oddStrokeStyle: "#ccc"
},
dataCircle: {
r: 1,
strokeStyle: "#18ec6f",
fillStyle: "#18ec6f",
lineWidth: 0.5
},
dataLine: {
strokeStyle: "#18ec6f",
lineWidth: 2
},
font: {
fontColor: "#eee"
}
}
});
radarChart.init(document.querySelector("#radar1"), {
data: {
maxValue: [100, 100, 100, 100, 100, 200],
value: [80, 50, 30, 50, 100, 22],
description: ["第一名", "第二名", "第三名", "第四名", "第五名", "第六名"],
tooltipsString: function(description, value, maxVlaue) {
return "排名:" + description + "
" + "分数:" + value + "
" + "最高分: " + maxVlaue;
}
},
config: {
scale: 0.6,
dataFill: {
fillStyle: "#6fb08a"
}
}
});
radarChart.init(document.querySelector("#radar2"), {
data: {
maxValue: [100, 100, 100, 100, 100, 100, 300],
value: [30, 20, 40, 70, 100, 60, 250],
description: ["苹果", "香蕉", "番茄", "樱桃", "番石榴", "水蜜桃", "梨子"]
},
config: {
showTooltip: false,
scale: 1,
dataLine: {
strokeStyle: "yellow",
lineWidth: 3
},
dataCircle: {
r: 7,
strokeStyle: "yellow",
fillStyle: "#eee",
lineWidth: 7
},
bg: {
layer: 9,
evenFillStyle: "#fefefe",
oddFillStyle: "#ddd",
evenStrokeStyle: "#999",
oddStrokeStyle: "#999"
}
}
});
radarChart.init(document.querySelector("#radar3"), {
data: {
maxValue: [100, 100, 100, 100, 100, 100, 300, 400],
value: [30, 20, 40, 70, 100, 60, 250, 400],
description: ["苹果", "香蕉", "番茄", "樱桃", "番石榴", "水蜜桃", "梨子", "柠檬"]
},
config: {
scale: 1
}
});
radarChart.init(document.querySelector("#radar4"), {
data: {
maxValue: [100, 100, 100, 100, 100, 200],
value: [80, 50, 30, 50, 100, 22],
description: ["第一名", "第二名", "第三名", "第四名", "第五名", "第六名"],
tooltipsString: function(description, value, maxVlaue) {
return "排名:" + description + "
" + "分数:" + value + "
" + "最高分: " + maxVlaue;
}
},
config: {
scale: 0.6,
dataFill: {
fillStyle: "#6fb08a"
}
}
});