Browse Source

fix 切换为英文时图表不显示图例名称

cxmo 11 months ago
parent
commit
0183b170b3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/views/dataEntry_manage/mixins/chartPublic.js

+ 2 - 2
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -677,11 +677,11 @@ export const chartSetMixin = {
     /* 切换相关性图中英文 */
     changeRelevanceLang(){
         this.options.yAxis.forEach(item => {
-          item.title.text = this.currentLang == 'zh' ? item.title.textCh : item.title.textEn
+          item.title.text = this.currentLang == 'zh' ? item.title.textCh : item.title.textEn||item.title.textCh
         });
         //图例
         this.options.series.forEach(item => {
-          item.name = this.currentLang == 'zh' ? item.nameCh : item.nameEn
+          item.name = this.currentLang == 'zh' ? item.nameCh : item.nameEn||item.nameCh
         });
         //tooltip
         this.options.tooltip.formatter = this.currentLang == 'zh' ? this.options.tooltip.formatterCh : this.options.tooltip.formatterEn