浏览代码

修复商品价格曲线横轴显示bug

jwyu 9 月之前
父节点
当前提交
f358ef2810
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/hooks/chart/render.js

+ 1 - 3
src/hooks/chart/render.js

@@ -491,9 +491,7 @@ function setChartLang(changeLangIsCheck){
         options.value.tooltip.formatter = LangType.value == 'en'?options.value.tooltip.formatterEn:options.value.tooltip.formatterZh
         //x轴
         if(Source==2){
-            options.value.xAxis.categories = commodityXData.value.map(_ => {
-                LangType.value == 'en'?_.NameEn:_.Name
-            });
+            options.value.xAxis.categories = commodityXData.value.filter(_=>_.IsHide===0).map(_ => LangType.value == 'en'?_.NameEn:_.Name);
         }
         if([3].includes(Source)){
             options.value.xAxis.title.text=LangType.value == 'en'?options.value.xAxis.title.textEn:options.value.xAxis.title.textZh