Просмотр исходного кода

fix图表 title字体大小修改

liujiejie 4 месяцев назад
Родитель
Сommit
d71ecf785d

+ 16 - 4
src/views/performance/components/PlotlyCharts.vue

@@ -216,7 +216,13 @@ export default {
 
       // 配置图表布局
       const layout = {
-        title: `有功功率曲线分析${this.lineMarkerData.engineTypeName}`,
+        title: {
+          text: `有功功率曲线分析${this.lineMarkerData.engineTypeName}`,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         plot_bgcolor: this.config.lableConfig.plot_bgcolor,
         xaxis: { ...this.config.lableConfig.xaxis },
         yaxis: { ...this.config.lableConfig.yaxis },
@@ -253,9 +259,15 @@ export default {
         const highlightedData = [];
         const nonHighlightedData = [];
         const layout = {
-          title:
-            fentuCharts[0]?.enginName ||
-            fentuCharts[0]?.enginCode + "风机有功功率曲线分析",
+          title: {
+            text:
+              fentuCharts[0]?.enginName ||
+              fentuCharts[0]?.enginCode + "风机有功功率曲线分析",
+            font: {
+              size: 16, // 设置标题字体大小(默认 16)
+              weight: "bold",
+            },
+          },
           plot_bgcolor: this.config.lableConfig.plot_bgcolor,
           xaxis: this.config.lableConfig.xaxis,
           yaxis: this.config.lableConfig.yaxis,

+ 1 - 0
src/views/performance/components/chartsCom/BoxLineCharts.vue

@@ -199,6 +199,7 @@ export default {
           text: filteredData.title,
           font: {
             size: 16,
+            weight: "bold",
           },
         },
         xaxis: {

+ 8 - 1
src/views/performance/components/chartsCom/BoxMarkersCharts.vue

@@ -196,7 +196,14 @@ export default {
       });
 
       const layout = {
-        title: analysisTypeCode + data[0].engineName,
+        title: {
+          text: analysisTypeCode + data[0].engineName,
+          font: {
+            size: 16,
+            weight: "bold",
+          },
+        }, // 图表标题
+
         xaxis: {
           title: xaixs,
           type: "date",

+ 8 - 2
src/views/performance/components/chartsCom/FaultAll.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-15 14:24:59
- * @LastEditTime: 2025-03-13 16:23:46
+ * @LastEditTime: 2025-03-13 16:43:10
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/FaultAll.vue
@@ -89,7 +89,13 @@ export default {
 
       // 布局配置,设置双 Y 轴
       const layout = {
-        title: "全场故障次数与时长分析Top10",
+        title: {
+          text: "全场故障次数与时长分析Top10",
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         xaxis: {
           title: "故障类型",
           tickangle: 30,

+ 8 - 2
src/views/performance/components/chartsCom/FaultUnit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-15 15:49:57
- * @LastEditTime: 2025-03-13 16:25:02
+ * @LastEditTime: 2025-03-13 17:05:25
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/FaultUntal.vue
@@ -72,7 +72,13 @@ export default {
 
       // 布局配置,设置双 Y 轴
       const layout = {
-        title: "机组故障次数与时长分析Top10",
+        title: {
+          text: "机组故障次数与时长分析Top10",
+          font: {
+            size: 16,
+            weight: "bold",
+          },
+        },
         xaxis: {
           title: "故障机组",
           tickangle: 30,

+ 8 - 2
src/views/performance/components/chartsCom/GeneratorTemperature.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 11:18:49
- * @LastEditTime: 2025-03-13 16:27:13
+ * @LastEditTime: 2025-03-13 16:43:59
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/GeneratorTemperature.vue
@@ -175,7 +175,13 @@ export default {
         data.push(chartConfig);
       });
       const layout = {
-        title: this.chartData.title,
+        title: {
+          text: this.chartData.title,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         xaxis: {
           title: this.chartData.xaixs || "X轴", // 横坐标标题
           gridcolor: "rgb(255,255,255)",

+ 7 - 1
src/views/performance/components/chartsCom/TwoDMarkersChart.vue

@@ -263,7 +263,13 @@ export default {
 
       // 图表布局
       let layout = {
-        title: data.title,
+        title: {
+          text: data.title,
+          font: {
+            size: 16,
+            weight: "bold",
+          },
+        },
         xaxis: {
           title: this.chartData.xaixs,
           gridcolor: "rgb(255,255,255)", // 网格线颜色

+ 7 - 1
src/views/performance/components/chartsCom/WindRoseChart.vue

@@ -150,7 +150,13 @@ export default {
 
       // 图表布局
       const layout = {
-        title: `${analysisTypeCode} - ${data[0]?.enginName} `,
+        title: {
+          text: `${analysisTypeCode} - ${data[0]?.enginName} `,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         plot_bgcolor: "#e5ecf6",
         polar: {
           bgcolor: "#e5ecf6",

+ 7 - 1
src/views/performance/components/chartsCom/YewErrorBarChart.vue

@@ -138,7 +138,13 @@ export default {
       };
 
       const layout = {
-        title: "机组静态偏航误差值", // 图表标题
+        title: {
+          text: "机组静态偏航误差值", // 图表标题
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         xaxis: {
           title: "机组编号", // 横坐标标题
           tickmode: "array",

+ 7 - 1
src/views/performance/components/chartsCom/lineAndChildLine.vue

@@ -169,7 +169,13 @@ export default {
         });
 
       const layout = {
-        title: this.chartData.title,
+        title: {
+          text: this.chartData.title,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         xaxis: {
           title: this.chartData.xaixs || "X轴", // 横坐标标题
           gridcolor: "rgb(255,255,255)",

+ 7 - 1
src/views/performance/components/chartsCom/lineChartsFen.vue

@@ -183,7 +183,13 @@ export default {
       }
 
       const layout = {
-        title: this.chartData.title || "图表",
+        title: {
+          text: this.chartData.title || "图表",
+          font: {
+            size: 16,
+            weight: "bold",
+          },
+        },
         xaxis: {
           title: this.chartData.xaixs || "X轴",
           gridcolor: "rgb(255,255,255)",

+ 8 - 2
src/views/performance/components/chartsCom/powerMarkers2DCharts.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:32:12
- * @LastEditTime: 2025-02-28 11:13:02
+ * @LastEditTime: 2025-03-13 16:58:03
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/powerMarkers2DCharts.vue
@@ -263,7 +263,13 @@ export default {
 
       // 图表布局
       const layout = {
-        title: data.title,
+        title: {
+          text: data.title,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         xaxis: {
           title: this.chartData.xaixs,
           gridcolor: "rgb(255,255,255)", // 网格线颜色

+ 7 - 1
src/views/performance/components/chartsCom/yawErrorBarSum.vue

@@ -122,7 +122,13 @@ export default {
       };
 
       const layout = {
-        title: "静态偏航误差的绝对值机组台数分布情况", // 图表标题
+        title: {
+          text: "静态偏航误差的绝对值机组台数分布情况",
+          font: {
+            size: 16,
+            weight: "bold",
+          },
+        }, // 图表标题
         xaxis: {
           title: "静态偏航误差值(度)", // 横坐标标题
           gridcolor: "rgb(255,255,255)",

+ 8 - 2
src/views/performance/components/chartsCom/yawErrorLine.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-22 09:42:59
- * @LastEditTime: 2025-03-13 16:30:03
+ * @LastEditTime: 2025-03-13 16:56:32
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/yawErrorLine.vue
@@ -173,7 +173,13 @@ export default {
         });
 
       const layout = {
-        title: this.chartData.data[0].title,
+        title: {
+          text: this.chartData.data[0].title,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         xaxis: {
           gridcolor: "rgb(255,255,255)",
           tickcolor: "rgb(255,255,255)",