Browse Source

Merge pull request 'fix-2664 超过24小时横坐标显示小时' (#2729) from fix-2664 into V20220830

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/2729
Reviewed-by: chenshihai <chenshh@pcl.ac.cn>
pull/2735/head
chenshihai 2 years ago
parent
commit
2d2024d7d8
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      web_src/js/index.js

+ 3
- 1
web_src/js/index.js View File

@@ -5086,7 +5086,7 @@ function initChartsNpu() {
axisLabel: {
interval: "auto",
},
name: "时间(min)",
name: "",
},
yAxis: {
show: true,
@@ -5142,7 +5142,9 @@ function initChartsNpu() {
};
return seriesOption;
});
let xAxisValue = res.Interval === 1 ? "时间(min)" : "时间(hour)";
let xLength = res.MetricsInfo[0].value.length;
options.xAxis.name = xAxisValue;
options.xAxis.data = Array.from(
{ length: xLength },
(_, index) => index


Loading…
Cancel
Save