|
@@ -110,7 +110,7 @@ const indicatorFormatter = (name: string, indicator: any) => {
|
|
|
* 在图中定位每个数据的位置
|
|
|
*/
|
|
|
const positionLabelData = (data: number[], idx: number) => {
|
|
|
- const labelValue: any = [0, 0, 0, 0, 0];
|
|
|
+ const labelValue: any = [-1, -1, -1, -1, -1];
|
|
|
labelValue[idx] = data[idx];
|
|
|
// idx = 0,1,2,3,4 对应 top,left,bottom,bottom,right
|
|
|
let pos = "bottom";
|
|
@@ -130,7 +130,7 @@ const positionLabelData = (data: number[], idx: number) => {
|
|
|
fontSize: 12,
|
|
|
position: pos,
|
|
|
formatter: (params: any) => {
|
|
|
- return params.value > 0 ? params.value : "";
|
|
|
+ return params.value >= 0 ? params.value : "";
|
|
|
},
|
|
|
},
|
|
|
};
|