mirror of
https://github.com/klinecharts/KLineChart.git
synced 2024-11-25 16:22:43 +08:00
opt: applyNewData
reset axis
This commit is contained in:
parent
f067cf5b96
commit
091927257b
@ -665,6 +665,9 @@ export default class ChartImp implements Chart {
|
||||
}
|
||||
|
||||
applyNewData (data: KLineData[], more?: boolean | Partial<LoadDataMore>): void {
|
||||
this._drawPanes.forEach(pane => {
|
||||
(pane.getAxisComponent() as AxisImp).setAutoCalcTickFlag(true)
|
||||
})
|
||||
let loadDataMore = { forward: false, backward: false }
|
||||
if (isBoolean(more)) {
|
||||
loadDataMore.forward = more
|
||||
@ -672,7 +675,6 @@ export default class ChartImp implements Chart {
|
||||
} else {
|
||||
loadDataMore = { ...loadDataMore, ...more }
|
||||
}
|
||||
|
||||
this._chartStore.addData(data, LoadDataType.Init, loadDataMore)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user