liyongli 2 سال پیش
والد
کامیت
5c9591d234

+ 0 - 1
src/pages/CommonBigScreen/components/Map-l7.jsx

@@ -218,7 +218,6 @@ function Map(prop) {
     function timeout() {
         // scene.setCenter([source[index].lng, source[index].lat])
         for (let index = 0; index < source.length; index++) {
-            console.log(source[index])
             // anchorLayer && scene.removeAllMakers();
             // textLayer && scene.removeLayer(textLayer);
             var el = document.createElement('div'), son = document.createElement('div');

+ 16 - 3
src/pages/CommonBigScreen/components/SelfPlatform.jsx

@@ -29,8 +29,8 @@ function Usertrend(prop) {
             height,
             width,
             padding: [
-                10,
-                40,
+                20,
+                60,
                 30,
                 70,
             ]
@@ -91,7 +91,20 @@ function Usertrend(prop) {
             grid: null
         });
         chart.tooltip(false);
-        chart.line().shape('smooth').color('#3ae8ef').position('Data*sales');
+        chart.line().shape('smooth').color('#3ae8ef').position('Data*sales').label('sales', val => {
+            return {
+                content: utils.formatNumber(val, 2) + '次',
+                offsetX: 20,
+                style: {
+                    fill: "#ffffff",
+                },
+                transform: [
+                    {
+                        type: 'overlapHide',
+                    },
+                ],
+            }
+        });
         chart.area().shape('smooth').color('l(90) 0:#3ae8ef 1:rgba(0,0,0,0)').position('Data*sales');
         chart.render();
     }

+ 20 - 5
src/pages/CommonBigScreen/components/Usertrend.jsx

@@ -28,8 +28,8 @@ function Usertrend(prop) {
             height: height - 20,
             width,
             padding: [
-                10,
-                40,
+                20,
+                60,
                 30,
                 70,
             ]
@@ -47,7 +47,8 @@ function Usertrend(prop) {
         chart.scale('Data', {
             range: [0, 1],
             tickCount: 10,
-            type: 'timeCat'
+            type: 'timeCat',
+            mask: "MM-DD"
         });
         chart.scale('sales', {
             nice: true,
@@ -69,7 +70,7 @@ function Usertrend(prop) {
         chart.axis('sales', {
             label: {
                 formatter: n => {
-                    return utils.formatNumber(n,2);
+                    return utils.formatNumber(n, 2);
                 },
                 style: {
                     fill: "#fff"
@@ -87,8 +88,22 @@ function Usertrend(prop) {
         });
         chart.tooltip(false);
 
-        chart.line().shape('smooth').color('#3ae8ef').position('Data*sales');
+        chart.line().shape('smooth').color('#3ae8ef').position('Data*sales').label('sales', val => {
+            return {
+                content: utils.formatNumber(val, 2),
+                offsetX: 20,
+                style: {
+                    fill: "#ffffff",
+                },
+                transform: [
+                    {
+                        type: 'overlapHide',
+                    },
+                ],
+            }
+        });
         chart.area().shape('smooth').color('l(90) 0:#3ae8ef 1:rgba(0,0,0,0)').position('Data*sales');
+        chart.point().shape('smooth').position('Data*sales')
         chart.render();
     }
     onMount(() => {