Merge pull request #12217 from ulleo/dev-v2

fix(图表): 修复双线组合图左纵轴自定义配色方案不正确问题
This commit is contained in:
ulleo 2024-09-14 11:05:24 +08:00 committed by GitHub
commit 371a9c8167
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -870,9 +870,9 @@ export class DualLineMix extends ColumnLineMix {
p[n.id] = n
return p
}, {})
const { yAxis, extStack } = chart
const { yAxis, xAxisExt } = chart
const { data } = options as unknown as Options
if (extStack?.length) {
if (xAxisExt?.length) {
const seriesSet = new Set()
data[0]?.forEach(d => d.category !== null && seriesSet.add(d.category))
const tmp = [...seriesSet]
@ -917,8 +917,8 @@ export class DualLineMix extends ColumnLineMix {
const result: ChartBasicStyle['seriesColor'] = []
const seriesSet = new Set<string>()
const colors = chart.customAttr.basicStyle.colors
const { yAxis, extStack } = chart
if (extStack?.length) {
const { yAxis, xAxisExt } = chart
if (xAxisExt?.length) {
data?.forEach(d => {
if (d.value === null || d.category === null || seriesSet.has(d.category)) {
return