klinecharts/KLineChart

applyMoreData(dataList, more, callback)

Closed this issue · 2 comments

what do we use since applyMoreData(dataList, more, callback) has been deprecated since version 9.8.0. ?
Thanks

looks like we should use setLoadDataCallback for both new and old data:

chart.setLoadDataCallback(async ({ type, data, callback }) => {
        console.log('load data ', type, data);
        if (type === 'backward') {
          callback(await genData(data!.timestamp, 20));
        } else { // forward
          callback(await genData(data!.timestamp, 20), true);
        }
      });

looks like we should use setLoadDataCallback for both new and old data:

chart.setLoadDataCallback(async ({ type, data, callback }) => {
        console.log('load data ', type, data);
        if (type === 'backward') {
          callback(await genData(data!.timestamp, 20));
        } else { // forward
          callback(await genData(data!.timestamp, 20), true);
        }
      });

Thanks rugia813