瀏覽代碼

fix 图表

liujiejie 2 月之前
父節點
當前提交
02838062d6

+ 1 - 0
src/icons/svg/pl1.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1742455785348" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4682" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M532.8896 858.112h446.8736c23.9616 0 43.6224-19.2512 43.6224-43.008s-19.6608-43.008-43.6224-43.008H532.8896c-23.9616 0-43.6224 19.2512-43.6224 43.008s19.456 43.008 43.6224 43.008zM979.7632 899.6864H320.512c-23.9616 0-43.6224 19.2512-43.6224 43.008s19.6608 43.008 43.6224 43.008h659.2512c23.9616 0 43.6224-19.2512 43.6224-43.008s-19.6608-43.008-43.6224-43.008z" fill="#97B6CE" p-id="4683"></path><path d="M131.072 589.6192l433.152-423.936 218.9312 214.4256-433.152 423.936zM672.9728 59.392c25.8048-25.1904 60.0064-39.1168 96.4608-39.1168s70.656 13.9264 96.4608 39.1168l26.0096 25.6C917.7088 110.1824 931.84 143.7696 931.84 179.4048c0 35.6352-14.1312 69.2224-39.936 94.4128l-67.1744 65.7408-219.136-214.4256L672.9728 59.392zM94.208 635.0848l209.92 205.4144C240.2304 875.3152 103.8336 917.0944 0 944.128c23.1424-105.8816 60.416-244.9408 94.208-309.0432z" fill="#1E69A2" p-id="4684"></path></svg>

+ 1 - 0
src/icons/svg/pl2.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1742455777073" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4321" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M757.8 332c-6.4-21.1-20.4-40.3-39.5-54.1l-11.2-8.1c-41.2-29.8-93.9-25.8-117.6 9L329.7 664.9c-1.2 1.7-2 3.6-2.5 5.5-2.6 4-4 8.9-3.8 14.1l6.3 125.3 0.4 3.6c2.8 13.7 10.9 19.9 15.5 22.3 4.5 2.4 8.9 3.3 13.3 3.3 9.1 0 17.7-4 24.5-7.3 2.4-1.1 4.9-2.3 7.2-3.2l88-38.6c1.4-0.6 2.6-1.3 3.8-2.2 3-1.5 5.7-3.6 7.7-6.6L750 395c11.8-17.4 14.6-40.3 7.8-63z" fill="#1296db" opacity=".8" p-id="4322"></path><path d="M462 800.5c-5.8 0-11.6-1.7-16.7-5.3-13.1-9.2-16.3-27.4-7.1-40.5L747.6 314c9.6-13.6 6.4-30.5 3.6-39.4-5.6-17.8-18.8-35-36.3-47.3l-16.5-11.6c-34-23.9-76.4-24.5-92.6-1.3L296.3 655.2c-9.2 13.1-27.3 16.3-40.5 7.1-13.1-9.2-16.3-27.4-7.1-40.5L558.1 181c34.9-49.8 112.8-55.5 173.7-12.9l16.5 11.6c28.2 19.8 49 47.3 58.4 77.5 10.2 32.4 6 65.3-11.5 90.2L485.8 788.2c-5.7 8-14.7 12.3-23.8 12.3z" fill="#1296db" p-id="4323"></path><path d="M291.8 871c-6.5 0-13.1-1.3-19.7-4.7-6.8-3.5-18.8-12.1-22.8-31.3l-0.7-5-9.3-175.8c-0.9-17.9 12.8-33.1 30.7-34.1 17.9-0.9 33.1 12.8 34.1 30.7l7.7 146.4c1.5-0.6 3-1.2 4.4-1.7l127.5-53.2c16.5-6.9 35.5 0.9 42.4 17.4 6.9 16.5-0.9 35.5-17.4 42.4l-130 54.2c-3.5 1.2-7.1 2.9-10.6 4.5-10.2 4.5-22.9 10.2-36.3 10.2z" fill="#1296db" p-id="4324"></path><path d="M451 763.8L286 641.2c-8.2-6.1-10-17.9-3.8-26.1l2.8-3.8c6.1-8.2 17.9-10 26.1-3.8l165 122.6c8.2 6.1 10 17.9 3.8 26.1l-2.8 3.8c-6.1 8.2-17.8 9.9-26.1 3.8zM711.8 368.3L557.6 253.7c-9.6-7.1-11.6-20.8-4.5-30.4l5.7-7.6c7.1-9.6 20.8-11.6 30.4-4.5l154.1 114.6c9.6 7.1 11.6 20.8 4.5 30.4l-5.7 7.6c-7.1 9.6-20.7 11.6-30.3 4.5z" fill="#1296db" p-id="4325"></path></svg>

+ 1 - 0
src/icons/svg/pl3.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1742455793344" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5096" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 0m368.64 0l286.72 0q368.64 0 368.64 368.64l0 286.72q0 368.64-368.64 368.64l-286.72 0q-368.64 0-368.64-368.64l0-286.72q0-368.64 368.64-368.64Z" fill="#DFF9F0" p-id="5097"></path><path d="M496.7936 749.80352l-78.9504-79.1552H298.7008A42.6496 42.6496 0 0 1 256 627.95776l0.2048-298.53696A42.57792 42.57792 0 0 1 298.93632 286.72h426.3936c23.58272 0 42.7008 19.0464 42.68032 42.7008l-0.2048 298.56768a42.67008 42.67008 0 0 1-42.7008 42.67008H606.208l-79.27808 79.14496a21.30944 21.30944 0 0 1-30.13632 0z" fill="#16DA99" p-id="5098"></path></svg>

+ 1 - 0
src/icons/svg/pl4.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1742455798834" class="icon" viewBox="0 0 1163 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5254" xmlns:xlink="http://www.w3.org/1999/xlink" width="227.1484375" height="200"><path d="M357.40767 87.081054v495.104586c0 22.699253 18.565718 41.264971 41.264971 41.264972h383.926104c-0.136064 1.360641-0.211134 2.725975-0.211134 4.119459v105.224504c0 22.689869 13.123152 28.132435 29.178721 12.08625l121.42083-121.430213h134.084178c22.689869 0 41.264971-18.565718 41.264972-41.264972V87.081054c-0.009384-22.694561-18.575102-41.260279-41.274356-41.26028H398.658566c-22.685178 0-41.250896 18.565718-41.250896 41.26028z" fill="#4E6070" p-id="5255"></path><path d="M875.957517 332.568926m-63.950149 0a63.950149 63.950149 0 1 0 127.900298 0 63.950149 63.950149 0 1 0-127.900298 0Z" fill="#F0F7FF" p-id="5256"></path><path d="M599.432944 332.568926m-63.950149 0a63.950149 63.950149 0 1 0 127.900298 0 63.950149 63.950149 0 1 0-127.900298 0Z" fill="#F0F7FF" p-id="5257"></path><path d="M727.281631 739.522712v65.179419c0 24.055203-4.175762 53.013407-9.285205 64.367725-5.095368 11.344935-51.657457 20.625448-75.71266 20.625448H340.695239c-24.059895 0-43.690667 0.619326-43.634364 1.370025 0.051611 0.760082 0.098529 22.450584 0.098529 46.510479v17.721182c0 24.055203-2.955876 50.071606-6.55923 57.799111-3.61743 7.741581-36.540261-15.90543-53.548279-32.913448L177.502717 920.638167c-17.022094-17.017402-50.625246-30.93348-74.680449-30.93348h-8.435977c-24.059895 0-53.027482-4.189837-64.377109-9.285205C18.664247 875.319423 9.383734 828.757333 9.383734 804.702131V397.077407c0-24.055203 9.285205-70.617292 20.63014-75.722044 11.344935-5.104751 40.317214-9.285205 64.377109-9.285205h195.557022v339.963308c0 24.064586 19.687074 43.746969 43.746969 43.746969h393.596041v43.742277h-0.009384z" fill="#00CCC6" p-id="5258"></path></svg>

+ 5 - 4
src/views/overview/components/dicCard/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-13 14:15:47
- * @LastEditTime: 2025-03-19 16:10:45
+ * @LastEditTime: 2025-03-20 16:01:41
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/dicCard/index.vue
@@ -10,7 +10,8 @@
   <div>
     <el-tooltip class="item" effect="dark" content="历史评论" placement="right">
       <div @click="drawer = true" class="drawerDescription">
-        <i class="el-icon-s-fold"> </i>
+        <!-- <i class="el-icon-s-fold"> </i> -->
+        <svg-icon icon-class="pl4" style="width: 35px; height: 35px" />
       </div>
     </el-tooltip>
     <el-drawer :visible.sync="drawer" title="分析评论">
@@ -133,7 +134,7 @@ export default {
 <style scoped lang="scss">
 .drawerDescription {
   position: fixed;
-  right: 80px;
+  right: 40px;
   bottom: 20%;
   background: rgb(255, 255, 255);
   border-radius: 50%;
@@ -141,7 +142,7 @@ export default {
   height: 50px;
   color: #707070;
   font-size: 30px;
-  box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px;
+  box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px;
   display: flex;
   align-items: center;
   justify-content: center;

+ 3 - 3
src/views/overview/index.vue

@@ -113,7 +113,7 @@
         placement="right"
       >
         <div class="tousutiwen_icon">
-          <svg-icon icon-class="tousutiwen" style="width: 30px; height: 30px" />
+          <svg-icon icon-class="pl1" style="width: 30px; height: 30px" />
         </div>
       </el-tooltip>
     </div>
@@ -480,14 +480,14 @@ export default {
   }
   .tousutiwen_box {
     position: fixed;
-    right: 80px;
+    right: 40px;
     bottom: 10%;
     background: rgb(255, 255, 255);
     border-radius: 50%;
     width: 50px;
     height: 50px;
     color: rgb(132, 145, 165);
-    box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px;
+    box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px;
     display: flex;
     align-items: center;
     justify-content: center;

+ 37 - 48
src/views/performance/components/chartsCom/3DDrawingChart.vue

@@ -80,23 +80,7 @@ export default {
   },
   data() {
     return {
-      color1: [
-        "#DBEEBC",
-        "#A8D7BE",
-        "#8ECAC1",
-        "#77BDC2",
-        "#64ADC2",
-        "#559ABE",
-        "#4884B7",
-        "#406DAB",
-        "#3856A0",
-        "#314291",
-        "#28357A",
-        "#1A285E",
-        "#FF7F50",
-        "#FFD700",
-        "#90EE90",
-      ], // 默认颜色
+      color1: [], // 默认颜色
       chartData: {},
       chartType: "scatter", // 当前图表类型(默认是散点图)
       colorSchemes: [...colorSchemes],
@@ -215,11 +199,15 @@ export default {
             `${this.chartData.yaixs}:` +
             "%{y} <br>" +
             `${this.chartData.zaixs}:` +
-            "%{z} <br>",
+            "%{z} <extra></extra>",
         };
         return trace;
       });
+      const yData = [...new Set(this.chartData.data[0].yData)]; // 获取机组编号
+      const ticktext = yData;
+      const tickvals = yData.map((_, index) => index + 1); // 让 tickvals 均匀分布
 
+      console.log(ticktext, "tickvals", tickvals);
       const layout = {
         title: {
           text: this.chartData.data[0].title,
@@ -228,12 +216,13 @@ export default {
             weight: "bold",
           },
         },
+
         scene: {
           xaxis: {
             title: this.chartData.xaixs,
             gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
-            backgroundcolor: "#e5ecf6",
+            backgroundcolor: "#CFD4DC",
             showbackground: true,
             linewidth: 2, // 轴线宽度
             linecolor: "black", // 轴线颜色
@@ -244,12 +233,12 @@ export default {
           },
           yaxis: {
             title: this.chartData.yaixs,
-            tickvals: [...new Set(this.chartData.data[0].yData)],
-            ticktext: [...new Set(this.chartData.data[0].yData)],
+            // tickvals: tickvals,
+            // ticktext: ticktext,
+            // range: [0.5, tickvals.length + 0.5], // 让刻度均匀排列
             gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
-            fixedrange: true, // 防止缩放
-            backgroundcolor: "#e5ecf6",
+            backgroundcolor: "#CFD4DC",
             showbackground: true,
             linewidth: 2, // 轴线宽度
             linecolor: "black", // 轴线颜色
@@ -261,7 +250,7 @@ export default {
             title: this.chartData.zaixs,
             gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
-            backgroundcolor: "#e5ecf6",
+            backgroundcolor: "#CFD4DC",
             showbackground: true,
             fixedrange: true, // 防止缩放
             linewidth: 2, // 轴线宽度
@@ -271,8 +260,8 @@ export default {
             tickcolor: "black",
           },
           aspectratio: {
-            x: 3,
-            y: 1.5,
+            x: 2.3,
+            y: 1.8,
             z: 1,
           },
           plot_bgcolor: "#e5ecf6",
@@ -280,22 +269,22 @@ export default {
           bgcolor: "#e5ecf6", // 设置背景颜色
           camera: {
             up: {
-              x: -0.0014269369124665849,
-              y: 0.0012146694366401958,
-              z: 0.9999982442130624,
+              x: 0.1404902084609593,
+              y: 0.21761427477626,
+              z: 0.9658708654577998,
             },
             center: {
-              x: -0.4418147101642839,
-              y: 0.11636199495350043,
-              z: -0.4133154056555356,
+              x: -0.1006727339672774,
+              y: 0.0754471798006855,
+              z: 0.005741722270889481,
             },
             eye: {
-              x: -2.482948029595208,
-              y: -2.2792871251589983,
-              z: 1.0941053354561574,
+              x: -2.10865062403837,
+              y: -2.6322931505097884,
+              z: 0.9078749284640724,
             },
             projection: {
-              type: "perspective",
+              type: "orthographic",
             },
           },
         },
@@ -383,27 +372,27 @@ export default {
       Plotly.relayout(`plotly-3d-chart-` + this.index, {
         "scene.camera": {
           up: {
-            x: -0.0014269369124665849,
-            y: 0.0012146694366401958,
-            z: 0.9999982442130624,
+            x: 0,
+            y: 0,
+            z: 1,
           },
           center: {
-            x: -0.4418147101642839,
-            y: 0.11636199495350043,
-            z: -0.4133154056555356,
+            x: 0,
+            y: 0,
+            z: 0,
           },
           eye: {
-            x: -2.482948029595208,
-            y: -2.2792871251589983,
-            z: 1.0941053354561574,
+            x: -1.9411806339437676,
+            y: -1.0688695891896567,
+            z: 0.47888991188707036,
           },
           projection: {
-            type: "perspective",
+            type: "orthographic",
           },
         },
         "scene.aspectratio": {
-          x: 3,
-          y: 1.5,
+          x: 2.2,
+          y: 1.8,
           z: 1,
         },
       });

+ 2 - 18
src/views/performance/components/chartsCom/Time3DChart.vue

@@ -74,23 +74,7 @@ export default {
   },
   data() {
     return {
-      color1: [
-        "#DBEEBC",
-        "#A8D7BE",
-        "#8ECAC1",
-        "#77BDC2",
-        "#64ADC2",
-        "#559ABE",
-        "#4884B7",
-        "#406DAB",
-        "#3856A0",
-        "#314291",
-        "#28357A",
-        "#1A285E",
-        "#FF7F50",
-        "#FFD700",
-        "#90EE90",
-      ], // 默认颜色
+      color1: [], // 默认颜色
       chartData: {},
       chartType: "scatter", // 当前图表类型(默认是散点图)
       colorSchemes: [...colorSchemes],
@@ -215,7 +199,7 @@ export default {
             `${this.chartData.yaixs}:` +
             "%{y} <br>" +
             `${this.chartData.zaixs}:` +
-            "%{z} <br>",
+            "%{z} <br><extra></extra>",
         };
 
         return trace;