Michael Wang 3 éve
szülő
commit
51ca0390df

+ 5 - 3
src/features/projectCompareDetail/ScoreRateCompare.vue

@@ -185,13 +185,13 @@ function segementsLine() {
     },
     xAxis: {
       type: "category",
-      data: courses[0].segements.map((v) => v[0]),
+      data: courses[0].segements.map((v) => Math.round(v[0] * 100) / 100),
     },
     yAxis: {
       type: "value",
     },
     series: courses.map((course) => ({
-      data: course.segements.map((v) => v[2]),
+      data: course.segements.map((v) => Math.round(v[2] * 100) / 100),
       name: course.projectName,
       type: "line",
       smooth: true,
@@ -318,7 +318,9 @@ function rangeSegementsLine() {
     },
     xAxis: {
       type: "category",
-      data: courses[0].rangeSegements.map((v) => v[0]),
+      data: courses[0].rangeSegements.map((v) =>
+        typeof v[0] === "number" ? Math.round(v[0] * 100) / 100 : v[0]
+      ),
     },
     yAxis: {
       type: "value",