refactor(图表): 柱状图等标签跟随主题

This commit is contained in:
wangjiahao 2024-07-22 20:05:31 +08:00
parent 3d29ca3ff0
commit dc5cb5be01

View File

@ -85,11 +85,12 @@ const initSeriesLabel = () => {
return return
} }
let initFlag = false let initFlag = false
const themeColor = dvMainStore.canvasStyleData.dashboard.themeColor
const axisMap = yAxis.value.reduce((pre, next) => { const axisMap = yAxis.value.reduce((pre, next) => {
let tmp = { let tmp = {
...next, ...next,
show: true, show: true,
color: props.themes === 'dark' ? '#fff' : '#000', color: themeColor === 'dark' ? '#fff' : '#000',
fontSize: COMPUTED_DEFAULT_LABEL.value.fontSize, fontSize: COMPUTED_DEFAULT_LABEL.value.fontSize,
showExtremum: false showExtremum: false
} as SeriesFormatter } as SeriesFormatter