| | |
| | | width: 2, |
| | | color: v.color, |
| | | }, |
| | | // label: { |
| | | // color: v.fontColor || "#000", |
| | | // fontSize: 16, |
| | | // formatter: "{b}:{c}", |
| | | // position: "middle", |
| | | // padding: [6, 4, 2, 4], |
| | | // backgroundColor: v.color, |
| | | // borderWidth: 2, |
| | | // borderColor: "#ffffff", |
| | | // }, |
| | | label: { |
| | | color: v.fontColor || "#000", |
| | | fontSize: 16, |
| | | formatter: "{b}:{c}", |
| | | position: "middle", |
| | | padding: [6, 4, 2, 4], |
| | | backgroundColor: v.color, |
| | | borderWidth: 2, |
| | | borderColor: "#ffffff", |
| | | }, |
| | | emphasis: { |
| | | type: "dashed", |
| | | show: false, |
| | | color: 'transparent' |
| | | }, |
| | | }); |
| | | }); |
| | |
| | | if (min == Infinity) { |
| | | return 0; |
| | | } |
| | | min = Math.min(...marks.map((v) => v.y), (min - min * 0.2).toFixed(2)); |
| | | min = Math.min(0, ...marks.map((v) => v.y), Math.round((min - min * 0.2) * 100) / 100); |
| | | return min; |
| | | }; |
| | | let max = |
| | |
| | | if (max == -Infinity) { |
| | | max = 1; |
| | | } |
| | | max = Math.max(...marks.map((v) => v.y), (max + max * 0.2).toFixed(2)); |
| | | max = Math.max(...marks.map((v) => v.y), Math.round((max + max * 0.2) * 100) / 100); |
| | | return max; |
| | | }; |
| | | return { |