Browse Source

出货未开票分析

xiaohaizhao 6 months ago
parent
commit
dee341c3bd

+ 22 - 0
salesPanel/AnalysisOfUninvoicedShipments/index.js

@@ -88,8 +88,23 @@ Component({
             })
         },
         initChart(data) {
+            console.log(123)
             let dividend = wx.getStorageSync('languagecode') == 'ZH' ? 10000 : 1000;
             let option = {
+                tooltip: {
+                    trigger: 'axis',
+                    confine: true, // Ensure tooltip stays within the chart area
+                    formatter: function (params) {
+                        let tooltipText = '';
+                        params.forEach((item, index) => {
+                            tooltipText += `${index==0?item.axisValue+'\n':''}${item.marker}${item.seriesName}: ${item.value}\n`;
+                        });
+                        return tooltipText;
+                    },
+                    textStyle: {
+                        fontSize: 10,
+                    }
+                },
                 xAxis: {
                     max: 'dataMax'
                 },
@@ -114,6 +129,13 @@ Component({
                 legend: {
                     show: true
                 },
+                grid: {
+                    top: '10%',
+                    left: '3%',
+                    right: '4%',
+                    bottom: '3%',
+                    containLabel: true
+                },
                 animationDuration: 0,
                 animationDurationUpdate: 3000,
                 animationEasing: 'linear',

+ 5 - 5
salesPanel/AnalysisOfUninvoicedShipments/index.scss

@@ -2,7 +2,7 @@
 @import "../analysisOfOrderTypeDistribution/index.scss";
 
 .chart {
-	height: 630rpx;
+	height: 530rpx;
 	width: 100vw;
 }
 
@@ -11,10 +11,10 @@
 
 	ec-canvas {
 		position: absolute;
-		top: -670rpx;
-		width: 700rpx;
-		height: 630rpx;
+		top: -570rpx;
+		width: 680rpx;
+		height: 530rpx;
 		z-index: 2;
-		right: 20rpx;
+		right: 50rpx;
 	}
 }