@funnest/charts-react 0.11.9 → 0.11.11

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.
@@ -14,7 +14,7 @@ export interface FnChartProps extends TradingChartOptions {
14
14
  }
15
15
  /**
16
16
  * React wrapper around `createTradingChart`. Creation-time options are read on mount;
17
- * `symbol`, `resolution`, `locale` and `theme` stay in sync with props; a new `datafeed`
17
+ * `symbol`, `resolution`, `locale`, `displayTimezone` and `theme` stay in sync with props; a new `datafeed`
18
18
  * recreates the widget. The ref exposes the widget (save/load, chart API, slots…).
19
19
  */
20
20
  export declare const FnChart: import("react").ForwardRefExoticComponent<FnChartProps & import("react").RefAttributes<TradingChart | null>>;
@@ -12,8 +12,8 @@ export interface FnMultiChartProps extends MultiChartOptions {
12
12
  /**
13
13
  * React wrapper around `createMultiChart`: split layout of 1–8 linked charts with one toolbar.
14
14
  * `panes`, `layout` and `sync` are read on mount (the user changes them from the toolbar; use
15
- * the ref's `setLayout`/`setSync`/`load` to drive them). `locale`, `theme` and `colorScheme`
16
- * stay in sync with props; a new `datafeed` recreates the widget.
15
+ * the ref's `setLayout`/`setSync`/`load` to drive them). `locale`, `displayTimezone`, `theme` and
16
+ * `colorScheme` stay in sync with props; a new `datafeed` recreates the widget.
17
17
  */
18
18
  export declare const FnMultiChart: import("react").ForwardRefExoticComponent<FnMultiChartProps & import("react").RefAttributes<MultiChart | null>>;
19
19
  /** The surrounding `<FnMultiChart>`'s widget (null until mounted). */
package/dist/index.js CHANGED
@@ -45,6 +45,10 @@ var FnChart = forwardRef(function FnChart2(props, ref) {
45
45
  useEffect(() => {
46
46
  if (widget && locale) widget.setLocale(locale);
47
47
  }, [widget, locale]);
48
+ const { displayTimezone } = options;
49
+ useEffect(() => {
50
+ if (widget && displayTimezone) widget.setDisplayTimezone(displayTimezone);
51
+ }, [widget, displayTimezone]);
48
52
  useEffect(() => {
49
53
  if (widget && colorScheme) widget.setColorScheme(colorScheme);
50
54
  }, [widget, colorScheme]);
@@ -97,6 +101,10 @@ var FnMultiChart = forwardRef2(function FnMultiChart2(props, ref) {
97
101
  useEffect2(() => {
98
102
  if (widget && locale) widget.setLocale(locale);
99
103
  }, [widget, locale]);
104
+ const { displayTimezone } = options;
105
+ useEffect2(() => {
106
+ if (widget && displayTimezone) widget.setDisplayTimezone(displayTimezone);
107
+ }, [widget, displayTimezone]);
100
108
  useEffect2(() => {
101
109
  if (widget && colorScheme) widget.setColorScheme(colorScheme);
102
110
  }, [widget, colorScheme]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnest/charts-react",
3
- "version": "0.11.9",
3
+ "version": "0.11.11",
4
4
  "description": "React bindings for Funnest Charts: the trading widget plus SVG line, area and bar charts",
5
5
  "keywords": [
6
6
  "react",
@@ -46,9 +46,9 @@
46
46
  "NOTICE"
47
47
  ],
48
48
  "dependencies": {
49
- "@funnest/charts": "0.11.9",
50
- "@funnest/charts-ui": "0.11.9",
51
- "@funnest/charts-viz": "0.11.9"
49
+ "@funnest/charts": "0.11.11",
50
+ "@funnest/charts-viz": "0.11.11",
51
+ "@funnest/charts-ui": "0.11.11"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": ">=18",