feat(视图): 组合图双y轴

This commit is contained in:
junjie 2021-09-06 17:27:59 +08:00
parent fc90d4b12d
commit 62759d2b66

View File

@ -1,4 +1,5 @@
import { hexColorToRGBA } from '@/views/chart/chart/util'
import { DEFAULT_YAXIS_EXT_STYLE } from '@/views/chart/chart/chart'
export function componentStyle(chart_option, chart) {
const padding = '8px'
@ -133,6 +134,7 @@ export function componentStyle(chart_option, chart) {
}
// axis ext
!customStyle.yAxisExt && (customStyle.yAxisExt = JSON.parse(JSON.stringify(DEFAULT_YAXIS_EXT_STYLE)))
chart_option.yAxis[1].show = customStyle.yAxisExt.show
chart_option.yAxis[1].position = customStyle.yAxisExt.position
chart_option.yAxis[1].name = customStyle.yAxisExt.name