From 841b51ac0ad43347d6ec03ba5df0b49dc53c927c Mon Sep 17 00:00:00 2001 From: liihuu Date: Mon, 6 Nov 2023 02:43:57 +0800 Subject: [PATCH] fix: fix multiple indicator style error. --- src/component/Indicator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/component/Indicator.ts b/src/component/Indicator.ts index b5154dd23..be9868c47 100644 --- a/src/component/Indicator.ts +++ b/src/component/Indicator.ts @@ -25,7 +25,7 @@ import { XAxis } from './XAxis' import { YAxis } from './YAxis' import { formatValue } from '../common/utils/format' -import { isValid, merge } from '../common/utils/typeChecks' +import { isValid, merge, clone } from '../common/utils/typeChecks' import { ArcAttrs } from '../extension/figure/arc' import { RectAttrs } from '../extension/figure/rect' @@ -311,7 +311,7 @@ export default abstract class IndicatorImp implements Indicator { this.visible = visible ?? true this.minValue = minValue ?? null this.maxValue = maxValue ?? null - this.styles = styles ?? {} + this.styles = clone(styles ?? {}) this.extendData = extendData this.regenerateFigures = regenerateFigures ?? null this.createTooltipDataSource = createTooltipDataSource ?? null