-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Lightweight Charts™ Version: 5.0.8
Steps/code to reproduce:
I create chart using chart config loaded from backend.
the config like this:
export type ChartConfig = {
id: number;
chartName: string;
klineChartConfig: KlineChartConfig;
indicatorChartConfigs: IndicatorChartConfig[];
export type IndicatorChartBaseConfig = {
isInMainChart: boolean; // isInMainChart
seriesConfigs: SeriesConfig[];
}
export type IndicatorChartConfig = IndicatorChartBaseConfig & {
chartId: ChartId; // chartId
indicatorKeyStr: IndicatorKeyStr; // indicatorKeyStr
isDelete: boolean; // isDelete
};
};

you can see I have a DELETE button in Pane Legend.
when click delete button, the logic is:
- delete indicatorChartConfig item from Array.
- use chartApi.removePane() to remove pane.
At this point an error occurred.


Then, I tried adding the "isDelete" field, not actually deleting it. When click delete button ,set isDelete to true. (When rendering, configurations whose isDelete field is equal to true are filtered.)
Still got the same error.
When only calling chartApi.removePane() and not change config, the pane is remove correctly. But I can't save the error result to backend.
How can I properly delete the Pane and also delete the configuration.
If need more detail, please tell me.
Metadata
Metadata
Assignees
Labels
No labels