Skip to content
Main Navigation 指南
图表API
实例API
Pro预览定制赞助
9.x 文档
8.x 文档

🇨🇳 简体中文

🇬🇧 English

🇨🇳 简体中文

🇬🇧 English

主题

Sidebar Navigation

getDom

getSize

setStyles

getStyles

setFormatter

getFormatter

setLocale

getLocale

setTimezone

getTimezone

setThousandsSeparator

getThousandsSeparator

setDecimalFold

getDecimalFold

setOffsetRightDistance

getOffsetRightDistance

setMaxOffsetLeftDistance

setMaxOffsetRightDistance

setLeftMinVisibleBarCount

setRightMinVisibleBarCount

setBarSpace

getBarSpace

setSymbol

getSymbol

setPeriod

getPeriod

setDataLoader

resetData

getDataList

getVisibleRange

createIndicator

overrideIndicator

getIndicators

removeIndicator

createOverlay

overrideOverlay

getOverlays

removeOverlay

setPaneOptions

getPaneOptions

setZoomEnabled

isZoomEnabled

setScrollEnabled

isScrollEnabled

scrollByDistance

scrollToRealTime

scrollToDataIndex

scrollToTimestamp

zoomAtCoordinate

zoomAtDataIndex

zoomAtTimestamp

convertToPixel

convertFromPixel

executeAction

subscribeAction

unsubscribeAction

getConvertPictureUrl

resize

页面导航

setDataLoader(dataLoader) ​

setDataLoader 设置数据加载器。

参考 ​

typescript
(
  dataLoader: {
    getBars: (params: object) => void | Promise<void>
    subscribeBar?: (params: object) => void
    unsubscribeBar?: (params: object) => void
  }
) => void

参数 ​

  • dataLoader 数据加载器。
    • getBars 获取数据,会在设置交易对信息,设置周期和图表左右拖动到边界时触发。
    • subscribeBar 订阅实时的数据,会在设置交易对信息,设置周期,getBars 完成之后触发。
    • unsubscribeBar 取消订阅实时的数据,会在设置交易对信息,设置周期后触发。

返回值 ​

setDataLoader 返回 undefined 。

用法 ​

基本使用 ​

在 GitHub 上编辑此页面

最后更新于:

Pager
上一篇getPeriod
下一篇resetData

Released under the Apache License V2.

Copyright © 2018-2025 liihuu