@forgecharts/sdk 1.5.20 → 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/react/internal.js
CHANGED
|
@@ -11887,6 +11887,24 @@ var TChart = class _TChart {
|
|
|
11887
11887
|
this._bus.emit("symbolChanged", { symbol });
|
|
11888
11888
|
if (symbol) this._connector?.reconnect(symbol, this._interval);
|
|
11889
11889
|
}
|
|
11890
|
+
/**
|
|
11891
|
+
* Re-fetch history for the current symbol/interval without changing either.
|
|
11892
|
+
*
|
|
11893
|
+
* setSymbol and setInterval both no-op when the value is unchanged, so a host
|
|
11894
|
+
* whose datafeed reads external state per request — a trading-session filter
|
|
11895
|
+
* (RTH/ETH), a timezone, a contract roll rule — had no way to tell the chart
|
|
11896
|
+
* that state had changed. The next request would carry the new value, but
|
|
11897
|
+
* nothing triggered a request, so the toggle appeared dead until the user
|
|
11898
|
+
* panned or switched symbol.
|
|
11899
|
+
*
|
|
11900
|
+
* @public
|
|
11901
|
+
* @since 1.5.21
|
|
11902
|
+
*/
|
|
11903
|
+
reloadData() {
|
|
11904
|
+
this._assertAlive();
|
|
11905
|
+
this._core.setDataBoundaryTime(null);
|
|
11906
|
+
this._connector?.reconnect(this._symbol, this._interval);
|
|
11907
|
+
}
|
|
11890
11908
|
/** Per-symbol drawing store — swapped in/out on setSymbol (TV behavior). */
|
|
11891
11909
|
_drawingsBySymbol = /* @__PURE__ */ new Map();
|
|
11892
11910
|
/**
|
|
@@ -22952,6 +22970,12 @@ var ChartCanvas = forwardRef(
|
|
|
22952
22970
|
getOverlayStore: () => chartRef.current?.getTradingOverlayStore() ?? null,
|
|
22953
22971
|
selectPointerTool: (tool) => selectPointerToolRef.current(tool),
|
|
22954
22972
|
getLastPrice: () => chartRef.current?.getLastPrice() ?? 0,
|
|
22973
|
+
/**
|
|
22974
|
+
* Re-fetch history without changing symbol or interval. For hosts whose
|
|
22975
|
+
* datafeed reads external state per request (RTH/ETH session filter,
|
|
22976
|
+
* timezone, roll rule) and needs the chart to ask again after it changes.
|
|
22977
|
+
*/
|
|
22978
|
+
reloadData: () => chartRef.current?.reloadData(),
|
|
22955
22979
|
captureScreenshot: async () => {
|
|
22956
22980
|
const container = outerRef.current;
|
|
22957
22981
|
if (!container) return null;
|