KLineChart icon indicating copy to clipboard operation
KLineChart copied to clipboard

[Bug] Performance and Indicator Misplacement Issues in v10.0.0-alpha8

Open M-Sufyan22 opened this issue 6 months ago • 2 comments

Version

10.0.0-alpha8

Steps to Reproduce

Reproduction Steps:

  • Set up a chart with indicators (built-in or custom)
  • Load data using setDataLoader
  • Update data via the callback function
  • Observe indicator misplacement

Code Example:

chart.setDataLoader({
      getBars: ({
        type,
        timestamp,
        callback
      }) => {
        if (type === "init") {
          callback(chartData, true);
        } else if (type === "forward" && timestamp) {
          fetchMoreData(timestamp, callback);
        };
      }
    });

Current Behavior

Hi, After upgrading from Klinecharts v9 to v10.0.0-alpha8, I've encountered performance issues, particularly with indicators. When new data is loaded via the callback, all indicators (both built-in and custom) become misplaced.

Expected Behavior

It should be very smooth while appending new data, and nothing should get misplaced.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

M-Sufyan22 avatar Jun 16 '25 11:06 M-Sufyan22

The indicator calculation has been changed to asynchronous, but it seems that there are indeed some problems now.

liihuu avatar Jun 19 '25 17:06 liihuu

I tried a solution using the batch update mechanism, and it is working for me.

M-Sufyan22 avatar Jun 19 '25 18:06 M-Sufyan22