wenhongquan 3 år sedan
förälder
incheckning
f083d345d0
1 ändrade filer med 13 tillägg och 0 borttagningar
  1. 13 0
      ruoyi-ui/src/views/components/table/homeTable.vue

+ 13 - 0
ruoyi-ui/src/views/components/table/homeTable.vue

@@ -990,6 +990,17 @@ export default {
           axisPointer: {
             type: "shadow",
           },
+          formatter:function(result){
+            let text = "";
+            let ele = "";
+            result.forEach(item=>{
+              ele = item.axisValue;
+              // console.log()
+              var c = "<span style=\"display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:"+newcolor(item)+";\"></span>"
+              text  += `${c} ${item.value[3]}:${item.value[2]}<br>`
+            })
+            return `${ele}<br>${text}`;
+          }
         },
         xAxis:
           {
@@ -1073,6 +1084,7 @@ export default {
         if (params.seriesIndex >= colorList.length) {
           index = params.seriesIndex - colorList.length;
         }
+        return colorList[index][0];
         return new that.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
           {
             offset: 0,
@@ -1121,6 +1133,7 @@ export default {
         return {
           type: "rect",
           position: p,
+          // color:newFill,
           shape: {
             x: start[0] + params.seriesIndex * barWidth + d,
             y: start[1],