Explorar o código

fix图表 title字体大小修改

liujiejie hai 4 meses
pai
achega
820f4c9031

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

@@ -212,7 +212,13 @@ export default {
       });
 
       const layout = {
-        title: this.chartData.data[0].title,
+        title: {
+          text: this.chartData.data[0].title,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
         scene: {
           xaxis: {
             title: this.chartData.xaixs,

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

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:30:17
- * @LastEditTime: 2025-03-13 16:10:58
+ * @LastEditTime: 2025-03-13 16:38:19
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/BarChart.vue
@@ -129,7 +129,13 @@ export default {
       };
 
       const layout = {
-        title: chartDataset.title, // 图表标题
+        title: {
+          text: chartDataset.title,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        }, // 图表标题
         xaxis: {
           title: this.chartData.xaixs || "X轴", // 横坐标标题
           gridcolor: "rgb(255,255,255)",

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

@@ -195,7 +195,12 @@ export default {
       }
 
       const layout = {
-        title: filteredData.title,
+        title: {
+          text: filteredData.title,
+          font: {
+            size: 16,
+          },
+        },
         xaxis: {
           title: this.chartData.xaixs,
           tickmode: "array",

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

@@ -198,7 +198,14 @@ export default {
       });
 
       const layout = {
-        title: this.chartData.data[0].title,
+        title: {
+          text: this.chartData.data[0].title,
+          font: {
+            size: 16, // 设置标题字体大小(默认 16)
+            weight: "bold",
+          },
+        },
+
         scene: {
           xaxis: {
             title: this.chartData.xaixs, // X 轴标题