echarts标题显示判断
This commit is contained in:
@@ -97,9 +97,28 @@ const tableStore = new TableStore({
|
||||
|
||||
loadCallback: () => {
|
||||
// tableStore.table.data.type
|
||||
let code = tableStore.table.params.statisticalType.code
|
||||
let title = '',
|
||||
titleX = ''
|
||||
if (code == 'Power_Network') {
|
||||
title = '区域'
|
||||
titleX = '区域'
|
||||
} else if (code == 'Manufacturer') {
|
||||
title = '终端厂家'
|
||||
titleX = '终端\n厂家'
|
||||
} else if (code == 'Voltage_Level') {
|
||||
title = '电压等级'
|
||||
titleX = '电压\n等级'
|
||||
} else if (code == 'Load_Type') {
|
||||
title = '干扰源类型'
|
||||
titleX = '干扰\n源类型'
|
||||
} else if (code == 'Report_Type') {
|
||||
title = '上报类型'
|
||||
titleX = '上报\n类型'
|
||||
}
|
||||
options.value = {
|
||||
title: {
|
||||
text: tableStore.table.params.statisticalType.name
|
||||
text: title
|
||||
},
|
||||
tooltip: {
|
||||
formatter: function (params: any) {
|
||||
@@ -122,7 +141,7 @@ const tableStore = new TableStore({
|
||||
right: '80px'
|
||||
},
|
||||
xAxis: {
|
||||
name: tableStore.table.params.statisticalType.name,
|
||||
name: titleX,
|
||||
data: tableStore.table.data.map((item: any) => item.type)
|
||||
},
|
||||
yAxis: {
|
||||
|
||||
@@ -97,9 +97,28 @@ const tableStore = new TableStore({
|
||||
|
||||
loadCallback: () => {
|
||||
// tableStore.table.data.type
|
||||
let code = tableStore.table.params.statisticalType.code
|
||||
let title = '',
|
||||
titleX = ''
|
||||
if (code == 'Power_Network') {
|
||||
title = '区域'
|
||||
titleX = '区域'
|
||||
} else if (code == 'Manufacturer') {
|
||||
title = '终端厂家'
|
||||
titleX = '终端\n厂家'
|
||||
} else if (code == 'Voltage_Level') {
|
||||
title = '电压等级'
|
||||
titleX = '电压\n等级'
|
||||
} else if (code == 'Load_Type') {
|
||||
title = '干扰源类型'
|
||||
titleX = '干扰\n源类型'
|
||||
} else if (code == 'Report_Type') {
|
||||
title = '上报类型'
|
||||
titleX = '上报\n类型'
|
||||
}
|
||||
options.value = {
|
||||
title: {
|
||||
text: tableStore.table.params.statisticalType.name
|
||||
text: title
|
||||
},
|
||||
tooltip: {
|
||||
formatter: function (params: any) {
|
||||
@@ -122,7 +141,7 @@ const tableStore = new TableStore({
|
||||
right: '80px'
|
||||
},
|
||||
xAxis: {
|
||||
name: tableStore.table.params.statisticalType.name,
|
||||
name: titleX,
|
||||
data: tableStore.table.data.type
|
||||
},
|
||||
yAxis: {
|
||||
|
||||
Reference in New Issue
Block a user