|
@@ -657,6 +657,8 @@ function setSplineOpt(e){
|
|
|
temYRightArr.push(item)
|
|
|
}
|
|
|
|
|
|
+ const textZh = item.ConvertUnit||item.Unit
|
|
|
+ const textEn = item.ConvertEnUnit||item.UnitEn||item.ConvertUnit||item.Unit
|
|
|
let yItem={
|
|
|
...basicYAxis,
|
|
|
IsAxis:item.IsAxis,
|
|
@@ -672,9 +674,9 @@ function setSplineOpt(e){
|
|
|
},
|
|
|
tickWidth: sameSideIndex !== index ? 0 : 1,
|
|
|
title: {
|
|
|
- text: sameSideIndex !== index ? '' : `${item.Unit}`,
|
|
|
- textZh:item.Unit,//中文单位
|
|
|
- textEn:item.Unit?item.UnitEn:'',//英文单位,但如果无中文单位则不显示
|
|
|
+ text: sameSideIndex !== index ? '' : `${textZh}`,
|
|
|
+ textZh:textZh,//中文单位
|
|
|
+ textEn:textZh?textEn:'',//英文单位,但如果无中文单位则不显示
|
|
|
align: 'high',
|
|
|
rotation: 0,
|
|
|
y: -15,
|
|
@@ -813,7 +815,8 @@ function setSeasonOpt(e){
|
|
|
}
|
|
|
series.push(seriesItem)
|
|
|
})
|
|
|
-
|
|
|
+ const textZh = item.ConvertUnit||item.Unit
|
|
|
+ const textEn = item.ConvertEnUnit||item.UnitEn||item.ConvertUnit||item.Unit
|
|
|
yAxis=[{
|
|
|
IsAxis:data.IsAxis,
|
|
|
labels: {
|
|
@@ -824,10 +827,10 @@ function setSeasonOpt(e){
|
|
|
}
|
|
|
},
|
|
|
title: {
|
|
|
- text: `${data.Unit}`,
|
|
|
- textZh:data.Unit, // 中文
|
|
|
+ text: `${textZh}`,
|
|
|
+ textZh:textZh, // 中文
|
|
|
// 中文不存在,无论英文有无都显示空
|
|
|
- textEn:data.Unit?data.UnitEn?data.UnitEn:'英文单位':'', // 英文
|
|
|
+ textEn:textZh?textEn||'英文单位':'', // 英文
|
|
|
align: 'high',
|
|
|
rotation: 0,
|
|
|
y: -5,
|
|
@@ -1032,6 +1035,8 @@ function setStackOrCombinChart(e){
|
|
|
temYRightArr.push(item)
|
|
|
}
|
|
|
|
|
|
+ const textZh = item.ConvertUnit||item.Unit
|
|
|
+ const textEn = item.ConvertEnUnit||item.UnitEn||item.ConvertUnit||item.Unit
|
|
|
let yItem={
|
|
|
...basicYAxis,
|
|
|
IsAxis:item.IsAxis,
|
|
@@ -1047,10 +1052,10 @@ function setStackOrCombinChart(e){
|
|
|
},
|
|
|
title: {
|
|
|
// text: sameSideIndex !== index ? '' : `${item.Unit}`,
|
|
|
- text: item.Unit,
|
|
|
- textZh:item.Unit, // 中文
|
|
|
+ text: textZh,
|
|
|
+ textZh:textZh, // 中文
|
|
|
// 中文不存在,无论英文有无都显示空
|
|
|
- textEn:item.Unit?item.UnitEn?item.UnitEn:'英文单位':'', // 英文
|
|
|
+ textEn:textZh?textEn||'英文单位':'', // 英文
|
|
|
align: 'high',
|
|
|
rotation: 0,
|
|
|
y: -15,
|
|
@@ -1212,12 +1217,15 @@ function setScatterOptions(data){
|
|
|
}
|
|
|
|
|
|
const { IsOrder,ChartColor } = dataList[0];
|
|
|
+
|
|
|
+ const textYZh = dataList[1].ConvertUnit||dataList[1].Unit
|
|
|
+ const textYEn = dataList[1].ConvertEnUnit||dataList[1].UnitEn||dataList[1].ConvertUnit||dataList[1].Unit
|
|
|
//y轴
|
|
|
let yAxis = {
|
|
|
title: {
|
|
|
- text: `${dataList[1].Unit}`,
|
|
|
- textZh:dataList[1].Unit,
|
|
|
- textEn:dataList[1].Unit?dataList[1].UnitEn:'',
|
|
|
+ text: `${textYZh}`,
|
|
|
+ textZh:textYZh,
|
|
|
+ textEn:textYZh?textYEn:'',
|
|
|
align: 'high',
|
|
|
rotation: 0,
|
|
|
y: -15,
|
|
@@ -1239,8 +1247,8 @@ function setScatterOptions(data){
|
|
|
},
|
|
|
opposite: false,
|
|
|
reversed: IsOrder,
|
|
|
- min: Number(dataList[0].MinData),
|
|
|
- max: Number(dataList[0].MaxData),
|
|
|
+ min: Number(dataList[1].MinData),
|
|
|
+ max: Number(dataList[1].MaxData),
|
|
|
tickWidth: 1,
|
|
|
tickLength: 5,
|
|
|
lineWidth: 1,
|
|
@@ -1275,7 +1283,8 @@ function setScatterOptions(data){
|
|
|
real_data.forEach(_ => {
|
|
|
series.data.push([_.x,_.y])
|
|
|
})
|
|
|
-
|
|
|
+ const textXZh = dataList[0].ConvertUnit||dataList[0].Unit
|
|
|
+ const textXEn = dataList[0].ConvertEnUnit||dataList[0].UnitEn||dataList[0].ConvertUnit||dataList[0].Unit
|
|
|
return {
|
|
|
title: {
|
|
|
text:''
|
|
@@ -1285,9 +1294,9 @@ function setScatterOptions(data){
|
|
|
xAxis: {
|
|
|
...scatterXAxis,
|
|
|
title: {
|
|
|
- text: `${dataList[0].Unit}`,
|
|
|
- textZh:dataList[0].Unit,
|
|
|
- textEn:dataList[0].Unit?dataList[0].UnitEn:'',
|
|
|
+ text: `${textXZh}`,
|
|
|
+ textZh:textXZh,
|
|
|
+ textEn:textXZh?textXEn:'',
|
|
|
align: 'high',
|
|
|
rotation: 0,
|
|
|
x: 0,
|