From 5effa6b95a6f2d4976397401fb2c560f6a74c456 Mon Sep 17 00:00:00 2001 From: Linho Date: Wed, 30 Apr 2025 01:04:19 +0800 Subject: [PATCH 1/2] Fix #344 Scatter graph updates Add the graphType to the key to handle graphType updates on the same function. --- src/chart.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/chart.ts b/src/chart.ts index 9464621..6c4b705 100644 --- a/src/chart.ts +++ b/src/chart.ts @@ -553,7 +553,11 @@ export class Chart extends EventEmitter.EventEmitter { }, (d: any) => { // The key is the function set or other value that uniquely identifies the datum. - return d.fn || d.r || d.x || d.text + // Add the graphType to the key to handle graphType updates on the same function (#344) + return JSON.stringify({ + function: d.fn || d.r || d.x || d.text, + graphType: d.graphType || 'interval' + }) } ) From df0cd40846e2e1f289463d28ee23ae1fc3f75491 Mon Sep 17 00:00:00 2001 From: Linho Date: Wed, 30 Apr 2025 12:13:51 +0800 Subject: [PATCH 2/2] Remove extra default value --- src/chart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chart.ts b/src/chart.ts index 6c4b705..68a5d26 100644 --- a/src/chart.ts +++ b/src/chart.ts @@ -556,7 +556,7 @@ export class Chart extends EventEmitter.EventEmitter { // Add the graphType to the key to handle graphType updates on the same function (#344) return JSON.stringify({ function: d.fn || d.r || d.x || d.text, - graphType: d.graphType || 'interval' + graphType: d.graphType }) } )