<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 4-4、圖表方法 # 圖表方法 - - - - - - 以下為圖表的方法列表。 **在1.4版本之前** 您可以使用Widget的構造函數返回給您的widget對象來調用下列方法。 **從1.5版本之后** 您可以使用Widget的方法[chart(index)](Widget-Methods.html#chartindex) 或 [activeChart()](Widget-Methods.html#activechart)返回給您的圖表對象來調用下列方法。 ## 方法 - 圖表訂閱事件 - [onDataLoaded()](#ondataloaded) - [onSymbolChanged()](#onsymbolchanged) - [onIntervalChanged()](#onintervalchanged) - [dataReady(callback)](#datareadycallback) - [crossHairMoved(callback)](#crosshairmovedcallback) - [onVisibleRangeChanged()](#onvisiblerangechanged) - 圖表動作 - [setVisibleRange(range, callback)](#setvisiblerangerange-callback) - [setSymbol(symbol, callback)](#setsymbolsymbol-callback) - [setResolution(resolution, callback)](#setresolutionresolution-callback) - [resetData()](#resetData) - [executeActionById(action)](#executeactionbyidactionid) - [getCheckableActionState(action)](#getcheckableactionstateactionid) - [refreshMarks()](#refreshmarks) - [clearMarks()](#clearmarks) - [setChartType(type)](#setcharttypetype) - [setTimezone(timezone)](#settimezonetimezone) - 指標與圖形 - [getAllShapes()](#getallshapes) - [getAllStudies()](#getallstudies) - [setEntityVisibility(id, isVisible)](#setentityvisibilityid-isvisible)\[過時\] - [createStudy(name, forceOverlay, lock, inputs, callback, overrides, options)](#createstudyname-forceoverlay-lock-inputs-callback-overrides-options) - [getStudyById(entityId)](#getstudybyidentityid) - [createShape(point, options)](#createshapepoint-options) - [createMultipointShape(points, options)](#createmultipointshapepoints-options) - [getShapeById(entityId)](#getshapebyidentityid) - [removeEntity(entityId)](#removeentityentityid) - [removeAllShapes()](#removeallshapes) - [removeAllStudies()](#removeallstudies) - [getPanes()](#getpanes) - 指標模板 - [createStudyTemplate(options)](#createstudytemplateoptions) - [applyStudyTemplate(template)](#applystudytemplatetemplate) - Trading Primitives - [createOrderLine()](#createorderlineoptions) - [createPositionLine()](#createpositionlineoptions) - [createExecutionShape()](#createexecutionshapeoptions) - Getters - [symbol()](#symbol) - [symbolExt()](#symbolExt) - [resolution()](#resolution) - [getVisibleRange()](#getvisiblerange) - [getVisiblePriceRange()](#getvisiblepricerange) - [priceFormatter()](#priceformatter) - [chartType()](#charttype) - [其他](#%E5%85%B6%E4%BB%96) - [exportData(options)](#exportdataoptions) # 圖表訂閱事件 #### onDataLoaded() 您可以使用此方法返回的訂閱[Subscription](Subscription.html)對象進行訂閱,以便在加載新歷史K線時通知,您還可以使用此訂閱對象取消此訂閱事件。 #### onSymbolChanged() 您可以使用此方法返回的[Subscription](Subscription.html)對象進行訂閱,以便在更改商品時通知,您還可以使用此訂閱對象取消此訂閱事件。 #### onIntervalChanged() 您可以使用此方法返回的[Subscription](Subscription.html)對象進行訂閱,以便在更改時間周期時通知,您還可以使用此訂閱對象取消此訂閱事件。 當事件被觸發時,它將提供以下參數: 1. `interval`: 新周期 2. `timeframeParameters`: 此對象只有一個字段 `timeframe`. 如果在用戶單擊時間周期面板時更改時間周期,則它包含timeframe。 否則 `timeframe` 為 `undefined`,你可以改變它來顯示某一范圍的K線。 有效的timeframe是一個數字,字母`D`代表天數,`M`代表月數。 例如: ``` widget.chart().onIntervalChanged().subscribe(null, function(interval, obj) { obj.timeframe = "12M"; }) ``` #### dataReady(callback) 1. `callback`: function(interval) 如果K線數據已被加載或被接收時,圖表庫將立即調用此回調。 返回 `true` 為已經加載,否則為`false`。 #### crossHairMoved(callback) *1.5版本開始* 1. `callback`: function({time, price}) 每當十字線位置改變時,圖表庫將會調用回調函數。 ### onVisibleRangeChanged() *1.13版本開始* 您可以使用此功能返回的[Subscription](Subscription.html)對象進行訂閱,以便在可見時間范圍更改時得到通知。 您還可以使用同一對象取消訂閱該事件。 # 圖表動作 #### setVisibleRange(range, callback) *1.2版本開始* 1. `range`: 對象, `{from to}` 1. `from`, `to`: unix時間戳, UTC 2. `callback`: `function()`. 圖表庫會調用回調在viewport(視口)設置完成時。 強制圖表調整其參數 (scroll, scale) 使選定的時間段適合視口。 `from`或`to`都不能設置為將來的日期。 #### setSymbol(symbol, callback) 1. `symbol`: string 2. `callback`: function() 更改圖表商品。 新商品的數據到達后調用回調。 #### setResolution(resolution, callback) 1. `resolution`: string. 格式化詳細參照:[周期](Resolution.html)。 2. `callback`: function() 更改圖表周期。 新周期的數據到達后調用回調。 #### resetData() 使圖表重新請求datafeed中的數據。 通常你需要在圖表數據發生變化時調用它。 在調用這個之前,你應該調用[onResetCacheNeededCallback](JS-Api.html#subscribebarssymbolinfo-resolution-onrealtimecallback-subscriberuid-onresetcacheneededcallback)。 #### executeActionById(actionId) *1.3版本開始* 1. `actionId`: string 通過它的id執行一個動作。 **顯示對話框** - `chartProperties` - `compareOrAdd` - `scalesProperties` - `tmzProperties` - `paneObjectTree` - `insertIndicator` - `symbolSearch` - `changeInterval` **其他動作** - `timeScaleReset` - `chartReset` - `seriesHide` - `studyHide` - `lineToggleLock` - `lineHide` - `showLeftAxis` - `showRightAxis` - `scaleSeriesOnly` - `drawingToolbarAction` - `magnetAction` - `stayInDrawingModeAction` - `hideAllMarks` - `showCountdown` - `showSeriesLastValue` - `showSymbolLabelsAction` - `showStudyLastValue` - `showStudyPlotNamesAction` - `undo` - `redo` - `paneRemoveAllStudiesDrawingTools` 例如: ``` // < ... > widget.chart().executeActionById("undo"); // < ... > widget.chart().executeActionById("drawingToolbarAction"); // 隱藏或顯示繪圖工具欄 // < ... > ``` #### getCheckableActionState(actionId) *1.7版本開始* 1. `actionId`: string 根據操作ID獲取是否可以勾選的狀態(例如: `stayInDrawingModeAction`、`magnetAction`)(請參閱上面的操作ID) #### refreshMarks() 再次請求可見標記。 #### clearMarks() 刪除所有可見標記。 #### setChartType(type) 1. `type`: number 設置主數據列的樣式。 ``` // 美國線 STYLE_BARS = 0; // K線圖 STYLE_CANDLES = 1; // 線形圖 STYLE_LINE = 2; // 面積圖 STYLE_AREA = 3; // 平均K線圖 STYLE_HEIKEN_ASHI = 8; // 空心K線圖 STYLE_HOLLOW_CANDLES = 9; // 磚形圖 STYLE_RENKO* = 4; // 卡吉圖 STYLE_KAGI* = 5; // 點數圖 STYLE_PNF* = 6; // 新價圖 STYLE_PB* = 7; ``` \*: 交易終端專屬 ### setTimezone(timezone) 1. `timezone`: string 查看[timezone](book/Widget-Constructor.md#timezone)更多信息 例: ``` widget.activeChart().setTimezone('Asia/Singapore'); ``` 更改圖表時區。 #### closePopupsAndDialogs() 調用此方法關閉上下文菜單或對話框,假設其已經顯示。 # 指標與圖形 #### getAllShapes() 返回所有已創建的形狀對象數組。 每個對象都有以下字段: - `id`: 形狀id - `name`: 形狀名稱 #### getAllStudies() 返回所有已創建的指標對象的數組。 每個對象都有以下字段: - `id`: 指標id - `name`: 指標名稱 #### setEntityVisibility(id, isVisible) 設置具有`id`的實體的可見性。 **不推薦使用**:使用形狀/指標API(`getShapeById` /`getStudyById`)來代替此方法。 將在未來的版本中刪除。 #### createStudy(name, forceOverlay, lock, inputs, callback, overrides, options) 1. `name`: string, 指標名稱,您可以在`技術指標`工具欄中看到。 2. `forceOverlay`: 強制圖表庫將創建的指標放在主窗格中 3. `lock`: boolean, 是否鎖定指標 4. `inputs`: (在`1.2`版本開始) 指標參數數組, 該數組應包含與指標屬性對話框中相同順序的輸入值。 5. `callback`: function(`entityId`) 6. `overrides`: (在`1.2`版本開始) 一個對象 [包含屬性](Studies-Overrides.html),覆蓋你的新指標 。注意:您不應指定指標名稱:應以具有繪圖名稱的屬性路徑為起始。 7. `options`: 這個對象只支持關鍵字`checkLimit`. 如果為 `true` 時,超出限制,將顯示指標限制對話框。 - `checkLimit` - 如果是`true`,則超出限制時將顯示指標限制對話框。 - `priceScale` - 指標的首選價格坐標。 可能的值是: - `left` - 將指標縮放到左邊 - `right` - 將指標縮放到右邊 - `no-scale` - 不要將指標納入任何價格坐標。 該指標將以`界面(無縮放)`模式添加 - `as-series` - 將指標附加到主數據列所附的價格坐標(僅適用于將指標添加到主數據列的窗格中) **從1.12版本開始,函數立即返回結果。 回調為保持兼容性** 創建一個關于主商品的指標。 例子: - `createStudy('MACD', false, false, [14, 30, "close", 9])` - `createStudy('Moving Average Exponential', false, false, [26])` - `createStudy('Stochastic', false, false, [26], null, {"%d.color" : "#FF0000"})` - `chart.createStudy('Moving Average', false, false, [26], null, {'Plot.linewidth': 10})` **Remark**: `Compare` 指標有2個參數: `[dataSource, symbol]`. 支持 `dataSource` 的值: `["close", "high", "low", "open"]`. **Remark 2**: 當您選擇在圖表上添加數據列時,您實際使用了`Overlay`指標,這個指標只有一個參數 -- `symbol`. 以下是添加商品的示例: ``` widget.chart().createStudy('Overlay', false, false, ['AAPL']); ``` **Remark 3**: 當您選擇比較數據列時,您實際上使用了`Compare`指標。 它有2個參數 -- `source` 和 `symbol`. 下面是一個添加比較數據列的例子: ``` widget.chart().createStudy('Compare', false, false, ["open", 'AAPL']); ``` #### getStudyById(entityId) 1. `entityId`:對象。 通過API創建指標時返回的值。 返回[指標 API](Study-Api.html)的一個實例,它允許您與指標進行交互。 #### createShape(point, options) 1. `point`: 對象 `{time, [price], [channel]}` 1. `time`: unix時間戳. 唯一的強制性參數。 2. `price`: 如果指定`price`,則形狀將以相同的價格水平放置。 如果未指定,則根據`channel`值將形狀放置在K線的相關位置。 3. `channel`: 要保持價格水平線,要使用`channel` 參數 (`open`, `high`, `low`, `close`)。 如果未指定則以`open`為默認值。 2. `options`: object `{shape, [text], [lock], [overrides]}` 1. `shape` 可能的值為 `arrow_up`、`arrow_down`、`flag`、`vertical_line`、`horizontal_line`。 `flag`為默認值。 2. `text` 是一個可選參數。 如果支持,為包含在形狀中的文本。 3. `lock` 是否鎖定圖形 4. `disableSelection` (開始于 `1.3`) 禁用選擇 5. `disableSave` (開始于 `1.3`) 禁用保存 6. `disableUndo` (開始于 `1.4`) 禁用撤銷 7. `overrides` (開始于 `1.2`). 它是一個對象,包含為新形狀設置的屬性。 8. `zOrder` (開始于 `1.3`) 可能的值為`top`、`bottom`。 `top` 將線條工具放在所有其他圖表對象的頂部, 而`bottom` 將線條工具放在所有其他圖表對象底部, `top`為默認值。 9. `showInObjectsTree`: `true`為默認值。在`工具樹狀圖`對話框中顯示形狀。 該函數返回`entityId` - 如果創建成功則返回圖形的唯一ID,如果不成功則返回`null`。 此調用會在圖表上的指定地點創建一個形狀,前提是它位于主數據列區域內。 #### createMultipointShape(points, options) 1. `points`: 具有以下字段的數組 `[{time, [price], [channel]},...]` 1. `time`: unix時間戳. 唯一的強制性參數。 2. `price`: 如果指定`price`,則形狀將以相同的價格水平放置。 如果未指定,則根據`channel`值將形狀放置在K線的相關位置。 3. `channel`: 要保持價格水平線,要使用`channel` 參數 (`open`, `high`, `low`, `close`)。 如果未指定則以`open`為默認值。 2. `options`: object `{shape, [text], [lock], [overrides]}` 1. `shape` 可能的值為 `arrow_up`、`arrow_down`、`flag`、`vertical_line`、`horizontal_line`。 `flag`為默認值。 2. `text` 是一個可選參數。 如果支持,為包含在形狀中的文本。 3. `lock` 是否鎖定圖形 4. `disableSelection` (開始于 `1.3`) 禁用選擇 5. `disableSave` (開始于 `1.3`) 禁用保存 6. `disableUndo` (開始于 `1.4`) 禁用撤銷 7. `overrides` (開始于 `1.2`). 它是一個對象,包含為新形狀設置的屬性。 8. `zOrder` (開始于 `1.3`) 可能的值為`top`、`bottom`。 `top` 將線條工具放在所有其他圖表對象的頂部, 而`bottom` 將線條工具放在所有其他圖表對象底部, `top`為默認值。 9. `showInObjectsTree`: `true`為默認值。在`工具樹狀圖`對話框中顯示形狀。 該函數返回`entityId` - 如果創建成功則返回圖形的唯一ID,如果不成功則返回`null`。 查看[形狀與覆蓋](Shapes-and-Overrides.html)以獲取更多信息。 此調用會在圖表上的指定地點創建一個形狀,前提是它位于主數據列區域內。 ### getShapeById(entityId) 1. `entityId`:對象。 通過API創建形狀時返回的值。 返回允許您與形狀交互的[形狀API](Shape-Api.html)實例。 #### removeEntity(entityId) 1. `entityId`:對象。 為創建實體 (形狀或指標) 后返回的值。 刪除指定實體。 #### removeAllShapes() 刪除全部形狀。 #### removeAllStudies() 刪除全部指標。 ### getPanes() 返回[容器Api](Pane-Api.html) 的實例數組,允許您與容器進行交互。 # 指標模板 #### createStudyTemplate(options) 1. `options`: 對象 `{saveInterval}` 1. `saveInterval`: boolean 將指標模板保存到JS對象。 圖表庫將調用您的回調函數并將狀態對象作為參數傳遞。 此調用是低級[存儲與加載圖表](Saving-and-Loading-Charts.html)的一部分。 #### applyStudyTemplate(template) 1. `template`: object 從狀態對象加載指標模板。 此調用是低級[存儲與加載圖表](Saving-and-Loading-Charts.html)的一部分。 # 交易元語(Trading Primitives) #### createOrderLine(options) `options` 是一個具有字段:`disableUndo`的對象, 可以是 `true` 或 `false`. 出于兼容性原因,默認值為 `false`。 在圖表上創建新的交易訂單并返回可用于調整其屬性和行為的API對象。 強烈建議在使用此調用之前閱讀[交易元語](Trading-Primitives.html)。 API對象方法: - `remove()`: 從圖表中移除倉位。 調用方法后不能再使用此API對象。 - `onModify(callback)` / `onModify(data, callback)` - `onMove(callback)` / `onMove(data, callback)` API對象具有下面列出的一組屬性。 每個屬性應通過各自的訪問器調用。 例如,如果你想使用`Extend Left`屬性,那么請使用`setExtendLeft()`和`getExtendLeft()`方法。 **一般屬性**: 屬性名稱類型支持的值默認值PriceDoubleDouble0.0TextStringString""TooltipStringString""QuantityStringString""EditableBooleanBooleantrue**趨勢線屬性**: 屬性名稱類型支持的值默認值Extend LeftBoolean"inherit" or BooleanTrueLine LengthInteger"inherit" or 0 .. 1000Line StyleInteger"inherit" or 0 .. 22Line WidthInteger"inherit" or 1 .. 41**字體**: 屬性名稱類型默認值Body FontString"bold 7pt Verdana"Quantity FontString"bold 7pt Verdana"**顏色**: 屬性名稱類型默認值Line ColorString"rgb(255, 0, 0)"Body Border ColorString"rgb(255, 0, 0)"Body Background ColorString"rgba(255, 255, 255, 0.75)"Body Text ColorString"rgb(255, 0, 0)"Quantity Border ColorString"rgb(255, 0, 0)"Quantity Background ColorString"rgba(255, 0, 0, 0.75)"Quantity Text ColorString"rgb(255, 255, 255)"Cancel Button Border ColorString"rgb(255, 0, 0)"Cancel Button Background ColorString"rgba(255, 255, 255, 0.75)"Cancel Button Icon ColorString"rgb(255, 0, 0)"例子: ``` widget.chart().createOrderLine() .onMove(function() { this.setText("onMove called"); }) .onModify("onModify called", function(text) { this.setText(text); }) .onCancel("onCancel called", function(text) { this.setText(text); }) .setText("STOP: 73.5 (5,64%)") .setQuantity("2"); ``` #### createPositionLine(options) `options` 是一個具有字段:`disableUndo`的對象, 可以是 `true` 或 `false`. 出于兼容性原因,默認值為 `false`。 在圖表上創建新的交易頭寸并返回一個可用于調整其屬性和行為的API對象。 強烈建議在使用此調用之前閱讀[交易元語](Trading-Primitives.html)。 API對象方法: - `remove()`: 從圖表中移除位置。 調用此方法后不能再使用API對象。 - `onModify(callback)` / `onModify(data, callback)` - `onMove(callback)` / `onMove(data, callback)` API對象具有下面列出的一組屬性。 每個屬性應通過各自的訪問器調用。 例如,如果你想使用`Extend Left`屬性,那么請使用`setExtendLeft()`和`getExtendLeft()`方法。 **一般屬性**: 屬性名稱類型支持的值默認值PriceDoubleDouble0.0TextStringString""TooltipStringString""QuantityStringString""**趨勢線屬性**: 屬性名稱類型支持的值默認值Extend LeftBoolean"inherit" or BooleanTrueLine LengthInteger"inherit" or 0 .. 1000Line StyleInteger"inherit" or 0 .. 22Line WidthInteger"inherit" or 1 .. 41**字體**: 屬性名稱類型默認值Body FontString"bold 7pt Verdana"Quantity FontString"bold 7pt Verdana"**顏色**: 屬性名稱類型默認值Line ColorString"rgb(0, 113, 224)"Body Border ColorString"rgb(0, 113, 224)"Body Background ColorString"rgba(255, 255, 255, 0.75)"Body Text ColorString"rgb(0, 113, 224)"Quantity Border ColorString"rgb(0, 113, 224)"Quantity Background ColorString"rgba(0, 113, 224, 0.75)"Quantity Text ColorString"rgb(255, 255, 255)"Reverse Button Border ColorString"rgb(0, 113, 224)"Reverse Button Background ColorString"rgba(255, 255, 255, 0.75)"Reverse Button Icon ColorString"rgb(0, 113, 224)"Close Button Border ColorString"rgb(0, 113, 224)"Close Button Background ColorString"rgba(255, 255, 255, 0.75)"Close Button Icon ColorString"rgb(0, 113, 224)"例子: ``` widget.chart().createPositionLine() .onModify(function() { this.setText("onModify called"); }) .onReverse("onReverse called", function(text) { this.setText(text); }) .onClose("onClose called", function(text) { this.setText(text); }) .setText("PROFIT: 71.1 (3.31%)") .setQuantity("8.235") .setPrice(15.5) .setExtendLeft(false) .setLineStyle(0) .setLineLength(25); ``` #### createExecutionShape(options) 1. `options` 是一個具有字段:`disableUndo`的對象, 這可以是 `true` 或 `false`. 出于兼容性原因,默認值為 `false`。 在圖表上創建新的交易執行并返回可用于控制執行屬性的API對象。 強烈建議在使用此調用之前閱讀[交易元語](Trading-Primitives.html)。 API對象具有下面列出的一組屬性。 每個屬性應通過各自的訪問器調用。 例如,如果你想使用`Extend Left`屬性,那么請使用`setExtendLeft()`和`getExtendLeft()`方法。 API對象方法: - `remove()`:從圖表中刪除執行信號圖形。調用后,您無法再次使用此API對象。 **一般屬性**: 屬性名稱類型支持的值默認值PriceDoubleDouble0.0TimeIntegerUnix time0DirectionString"buy" or "sell""buy"TextStringString"execution"TooltipStringString""Arrow HeightIntegerInteger8Arrow SpacingIntegerInteger1**字體**: 屬性名稱類型默認值FontString"8pt Verdana"**顏色**: 屬性名稱類型默認值Text ColorString"rgb(0, 0, 0)""Arrow ColorString"rgba(0, 0, 255)"例子: ``` widget.chart().createExecutionShape() .setText("@1,320.75 Limit Buy 1") .setTooltip("@1,320.75 Limit Buy 1") .setTextColor("rgba(0,255,0,0.5)") .setArrowColor("#0F0") .setDirection("buy") .setTime(1413559061758) .setPrice(15.5); ``` # Getters #### symbol() 返回圖表商品。 #### symbolExt() 返回圖表的商品信息對象。 該對象具有以下字段: - `symbol`: 與方法[symbol()](#symbol)結果相同 - `full_name`: 商品全稱 - `exchange`: 商品交易所 - `description`: 商品描述 - `type`: 商品類型 #### resolution() 返回圖表的周期。格式在這個[周期](Resolution.html)中描述。 #### getVisibleRange() 返回對象 `{from, to}`. `from` 和 `to` 是 **圖表時區**的單位時間戳 #### getVisiblePriceRange() **在1.7版本開始** 返回對象 `{from, to}`. `from` 和 `to` 是主數據列的可見范圍邊界。 #### priceFormatter() 返回帶有`format`函數的對象,可用于格式化價格。 #### chartType() 返回圖表類型。 ## 其他 ### exportData(options) *從1.14版本開始* 1. `options` (可選)是一個對象,它可以包含以下屬性: - `from` (`number`) - 第一個導出k線的時間(UNIX時間戳,以秒為單位)。 默認情況下,使用最左側加載的k線的時間。 - `to` (`number`) - 最后一個導k線的時間(UNIX時間戳,以秒為單位)。 默認情況下,使用最右側(實時)k線的時間。 - `includeTime`(`boolean`, 默認`true`) - 定義導出數據的每個項目是否應包含時間。 - `includeSeries`(`boolean`, 默認`true`) - 定義導出的數據是否應包含數據列(open,high,low,close)。 - `includedStudies` - 哪些指標應包括在導出的數據中 (默認情況下,值為`'all'`表示包含所有指標, 但如果您只想導出其中一些,則可以在數組中指定[指標ID](%EF%BC%83getallstudies))。 從圖表中導出數據,返回Promise對象。 此方法不加載數據。 結果具有以下結構: - `schema`是一個字段描述符數組,每個描述符可能是以下類型之一: - `TimeFieldDescriptor` - 時間字段的描述。 它只包含一個屬性 - 帶有`'time'`值的`type`。 - `SeriesFieldDescriptor` - 數據列字段的描述。 它包含以下屬性: - `type`(`'value'`) - `sourceType`(`'series'`) - `plotTitle`(`string`) - 繪圖的名稱(open,high,low,close)。 - `StudyFieldDescriptor` - 指標字段的描述。 它包含以下屬性: - `type`(`'value'`) - `sourceType`(`'study'`) - `sourceId`(`string`) - 指標ID - `sourceTitle`(`string`) - 指標的標題 - `plotTitle`(`string`) - 繪圖的標題 - `data` 為[Float64Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array)類型數組。 每個 `Float64Array` 數組與 `schema` 數組的長度相同,表示相關字段的項目。 **例如:** 1. `chart.exportData({ includeTime: false, includeSeries: true, includedStudies: [] })` - 僅導出數據列。 2. `chart.exportData({ includeTime: true, includeSeries: true, includedStudies: [] })` - 隨時間導出數據列。 3. `chart.exportData({ includeTime: false, includeSeries: false, includedStudies: ['STUDY_ID'] })` - 導出ID為`STUDY_ID`的指標數據。 4. `chart.exportData({ includeTime: true, includeSeries: true, includedStudies: 'all' })` - 從圖表中導出所有可用數據。 5. `chart.exportData({ includeTime: false, includeSeries: true, to: Date.UTC(2018, 0, 1) / 1000 })` - 導出`2018-01-01`以前的數據。 6. `chart.exportData({ includeTime: false, includeSeries: true, from: Date.UTC(2018, 0, 1) / 1000 })` - 導出`2018-01-01`之后的數據。 7. `chart.exportData({ includeTime: false, includeSeries: true, from: Date.UTC(2018, 0, 1) / 1000, to: Date.UTC(2018, 1, 1) / 1000 })` - 導出在 `2018-01-01` 和 `2018-02-01` 之間的數據。 # 也可以看看 - [Widget方法](Widget-Methods.html) - [定制概述](Customization-Overview.html) - [Widgetg構造函數](Widget-Constructor.html) - [存儲于加載圖表](Saving-and-Loading-Charts.html) - [指標覆蓋默認參數](Studies-Overrides.html) - [覆蓋默認參數](Overrides.html)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看