@forgecharts/sdk 1.5.19 → 1.5.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/TChart.d.ts +14 -0
- package/dist/api/TChart.d.ts.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/internal.js +24 -0
- package/dist/internal.js.map +1 -1
- package/dist/react/canvas/ChartCanvas.d.ts +8 -0
- package/dist/react/canvas/ChartCanvas.d.ts.map +1 -1
- package/dist/react/index.js +24 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/internal.js +24 -0
- package/dist/react/internal.js.map +1 -1
- package/package.json +1 -1
package/dist/internal.js
CHANGED
|
@@ -12015,6 +12015,24 @@ var TChart = class _TChart {
|
|
|
12015
12015
|
this._bus.emit("symbolChanged", { symbol });
|
|
12016
12016
|
if (symbol) this._connector?.reconnect(symbol, this._interval);
|
|
12017
12017
|
}
|
|
12018
|
+
/**
|
|
12019
|
+
* Re-fetch history for the current symbol/interval without changing either.
|
|
12020
|
+
*
|
|
12021
|
+
* setSymbol and setInterval both no-op when the value is unchanged, so a host
|
|
12022
|
+
* whose datafeed reads external state per request — a trading-session filter
|
|
12023
|
+
* (RTH/ETH), a timezone, a contract roll rule — had no way to tell the chart
|
|
12024
|
+
* that state had changed. The next request would carry the new value, but
|
|
12025
|
+
* nothing triggered a request, so the toggle appeared dead until the user
|
|
12026
|
+
* panned or switched symbol.
|
|
12027
|
+
*
|
|
12028
|
+
* @public
|
|
12029
|
+
* @since 1.5.21
|
|
12030
|
+
*/
|
|
12031
|
+
reloadData() {
|
|
12032
|
+
this._assertAlive();
|
|
12033
|
+
this._core.setDataBoundaryTime(null);
|
|
12034
|
+
this._connector?.reconnect(this._symbol, this._interval);
|
|
12035
|
+
}
|
|
12018
12036
|
/** Per-symbol drawing store — swapped in/out on setSymbol (TV behavior). */
|
|
12019
12037
|
_drawingsBySymbol = /* @__PURE__ */ new Map();
|
|
12020
12038
|
/**
|
|
@@ -23015,6 +23033,12 @@ var ChartCanvas = forwardRef(
|
|
|
23015
23033
|
getOverlayStore: () => chartRef.current?.getTradingOverlayStore() ?? null,
|
|
23016
23034
|
selectPointerTool: (tool) => selectPointerToolRef.current(tool),
|
|
23017
23035
|
getLastPrice: () => chartRef.current?.getLastPrice() ?? 0,
|
|
23036
|
+
/**
|
|
23037
|
+
* Re-fetch history without changing symbol or interval. For hosts whose
|
|
23038
|
+
* datafeed reads external state per request (RTH/ETH session filter,
|
|
23039
|
+
* timezone, roll rule) and needs the chart to ask again after it changes.
|
|
23040
|
+
*/
|
|
23041
|
+
reloadData: () => chartRef.current?.reloadData(),
|
|
23018
23042
|
captureScreenshot: async () => {
|
|
23019
23043
|
const container = outerRef.current;
|
|
23020
23044
|
if (!container) return null;
|