|
@@ -70,12 +70,29 @@ export default {
|
|
|
{
|
|
|
indicator: _this.indicator,
|
|
|
center: ["50%", "55%"],
|
|
|
- radius: "30%",
|
|
|
+ radius: "50%",
|
|
|
axisName: {
|
|
|
color: "#fff",
|
|
|
backgroundColor: "#666",
|
|
|
borderRadius: 3,
|
|
|
- padding: [3, 5]
|
|
|
+ padding: [3, 5],
|
|
|
+ formatter: function(value) {
|
|
|
+ // 将文本拆分成数组,每5个字一组
|
|
|
+ let words = value.split("");
|
|
|
+ let lines = [];
|
|
|
+ let currentLine = "";
|
|
|
+ for (let i = 0; i < words.length; i++) {
|
|
|
+ currentLine += words[i];
|
|
|
+ if (currentLine.length === 5) {
|
|
|
+ lines.push(currentLine);
|
|
|
+ currentLine = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (currentLine.length > 0) {
|
|
|
+ lines.push(currentLine);
|
|
|
+ }
|
|
|
+ return lines.join("\n");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
],
|