mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
echarts图表双轴优化
This commit is contained in:
@@ -148,6 +148,7 @@ export default {
|
||||
},
|
||||
global: false,
|
||||
showSymbol: false,
|
||||
yAxisIndex: index,
|
||||
data: result.values[index]
|
||||
}
|
||||
})
|
||||
@@ -193,19 +194,40 @@ export default {
|
||||
color: '#fff'
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
lineStyle: { type: 'dashed', color: '#435463' }
|
||||
yAxis: [
|
||||
{
|
||||
name: '充电电量(kW·h)',
|
||||
type: 'value',
|
||||
nameTextStyle: {
|
||||
color: '#fff' // 绿色名称
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: { type: 'dashed', color: '#435463' }
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 4,
|
||||
color: '#fff',
|
||||
fontSize:12
|
||||
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
// margin: 10,
|
||||
// interval: 60,
|
||||
color: '#fff',
|
||||
fontSize:12,
|
||||
// padding: [5, 0, 0, 0]
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '充电收益(元)',
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
lineStyle: { type: 'dashed', color: '#435463' }
|
||||
},
|
||||
nameTextStyle: {
|
||||
color: '#fff' // 绿色名称
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 4,
|
||||
color: '#fff',
|
||||
fontSize:12
|
||||
},
|
||||
},
|
||||
|
||||
],
|
||||
series: this.chargeChartData.ydata
|
||||
}
|
||||
option && chargeChart.setOption(option)
|
||||
|
||||
Reference in New Issue
Block a user