Merge pull request #775 from dataease/pr@dev@feat_chart_yaxis_ext

feat(视图): 组合图双y轴
This commit is contained in:
XiaJunjie2020 2021-09-06 17:29:04 +08:00 committed by GitHub
commit 1bd0242588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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