Skip to content

Commit

Permalink
Merge pull request #547 from cryptotooltop/main
Browse files Browse the repository at this point in the history
applyMoreData: data concatenated twice
  • Loading branch information
liihuu committed Apr 11, 2024
2 parents 0eaf30f + cfc8978 commit f66ed08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,7 @@ export default class ChartImp implements Chart {
*/
applyMoreData (data: KLineData[], more?: boolean, callback?: () => void): void {
logWarn('', '', 'Api `applyMoreData` has been deprecated since version 9.8.0.')
const dataList = data.concat(this._chartStore.getDataList())
this._chartStore.addData(dataList, LoadDataType.Forward, more ?? true).then(() => {}).catch(() => {}).finally(() => { callback?.() })
this._chartStore.addData(data, LoadDataType.Forward, more ?? true).then(() => {}).catch(() => {}).finally(() => { callback?.() })
}

updateData (data: KLineData, callback?: () => void): void {
Expand Down

0 comments on commit f66ed08

Please sign in to comment.