@funnest/charts-ui 0.11.10 → 0.11.12

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/NOTICE CHANGED
@@ -1,9 +1,30 @@
1
1
  Funnest Charts
2
2
  Copyright 2026 Funnest
3
3
 
4
- This product includes software developed by the Funnest Charts project.
4
+ This product includes software developed by the Funnest Charts project
5
+ (https://charts.funnest.xyz/).
5
6
 
6
- Trademarks: "Funnest", "Funnest Charts" and the Funnest logos (the brand/ directory and
7
- the logo marks in the code) are trademarks of Funnest. The Apache License 2.0 covers the
8
- code only and grants no rights to these names or logos (Section 6). Forks and
9
- redistributions must not use them to identify their own products.
7
+ Attribution notice
8
+ ------------------
9
+ This NOTICE file is part of the attribution notices that Section 4(d) of the Apache
10
+ License 2.0 asks every redistribution and Derivative Work to keep. Any product, website or
11
+ application that includes Funnest Charts (any @funnest/charts package, or code taken from
12
+ this repository), in source or object form, and that is made available to users must
13
+ display the following attribution, with a link to https://charts.funnest.xyz/, on or next
14
+ to every chart it shows:
15
+
16
+ Charts by Funnest (https://charts.funnest.xyz/)
17
+
18
+ The trading chart of @funnest/charts-ui does this for you: its logo badge at the bottom
19
+ left of the chart (the `attribution` option, on by default) shows the Funnest logo and
20
+ links to https://charts.funnest.xyz/. Keep it on. If you turn it off, or use only the
21
+ engine (@funnest/charts) or the SVG charts (@funnest/charts-viz), show the attribution and
22
+ the link yourself, on or next to each chart.
23
+
24
+ Trademarks
25
+ ----------
26
+ "Funnest", "Funnest Charts" and the Funnest logos (the brand/ directory and the logo marks
27
+ in the code) are trademarks of Funnest. The Apache License 2.0 covers the code only and
28
+ grants no rights to these names or logos (Section 6), except this one: you may show the
29
+ logo badge as shipped, unchanged, to give the attribution above. Forks and
30
+ redistributions must not use the names or logos to identify their own products.
package/README.md CHANGED
@@ -26,4 +26,4 @@ const widget = createTradingChart(document.getElementById('chart')!, {
26
26
 
27
27
  - Docs: https://charts.funnest.xyz/docs/
28
28
  - GitHub: https://github.com/funnest-xyz/funnest-charts ([한국어](https://github.com/funnest-xyz/funnest-charts/blob/main/README.ko.md))
29
- - License: Apache-2.0
29
+ - License: Apache-2.0, with an attribution notice ([NOTICE](NOTICE)): show "Charts by Funnest" and a link to https://charts.funnest.xyz/ on or next to every chart
package/dist/index.js CHANGED
@@ -7075,6 +7075,10 @@ function createPane(shell, config) {
7075
7075
  ctx,
7076
7076
  canSearch: typeof config.datafeed.searchSymbols === "function",
7077
7077
  load,
7078
+ setDisplayTimezone: (timeZone) => {
7079
+ chart.setDisplayTimezone(timeZone);
7080
+ ctx.displayTimezone = timeZone;
7081
+ },
7078
7082
  destroy: () => {
7079
7083
  offs.forEach((off) => off());
7080
7084
  Q(null, overlayHost);
@@ -7185,6 +7189,7 @@ function createTradingChart(container, options) {
7185
7189
  pane.chart.setLocale(locale2);
7186
7190
  pane.store.set({ locale: locale2 });
7187
7191
  },
7192
+ setDisplayTimezone: (timeZone) => pane.setDisplayTimezone(timeZone),
7188
7193
  save: () => pane.chart.save(),
7189
7194
  load: (state) => pane.chart.load(state),
7190
7195
  setTheme: shell.setTheme,
@@ -7252,7 +7257,7 @@ function createMultiChart(container, options) {
7252
7257
  } = options;
7253
7258
  if (paneSpecs.length === 0) throw new Error("funnest-charts: createMultiChart needs at least one pane");
7254
7259
  const locale = chartOptions.locale ??= browserLocale3();
7255
- const displayTimezone = defaultDisplayTimezone(locale, chartOptions.displayTimezone);
7260
+ let displayTimezone = defaultDisplayTimezone(locale, chartOptions.displayTimezone);
7256
7261
  const shell = createShell(container, {
7257
7262
  colorScheme,
7258
7263
  theme,
@@ -7567,6 +7572,12 @@ function createMultiChart(container, options) {
7567
7572
  p3.store.set({ locale: locale2 });
7568
7573
  }
7569
7574
  },
7575
+ setDisplayTimezone: (timeZone) => {
7576
+ if (timeZone === displayTimezone) return;
7577
+ new Intl.DateTimeFormat("en-US", { timeZone });
7578
+ displayTimezone = timeZone;
7579
+ for (const p3 of panes) p3.setDisplayTimezone(timeZone);
7580
+ },
7570
7581
  setTheme: shell.setTheme,
7571
7582
  setColorScheme: shell.setColorScheme,
7572
7583
  save,
@@ -63,6 +63,8 @@ export interface MultiChart {
63
63
  setSymbol(symbol: string, resolution?: Resolution): Promise<void>;
64
64
  setResolution(resolution: Resolution): Promise<void>;
65
65
  setLocale(locale: Locale): void;
66
+ /** Every pane's times in `timeZone` (IANA, e.g. 'UTC', 'America/New_York'); new panes too. */
67
+ setDisplayTimezone(timeZone: string): void;
66
68
  setTheme(theme: Partial<ThemeTokens>): void;
67
69
  setColorScheme(scheme: ColorScheme): void;
68
70
  save(): MultiChartState;
package/dist/pane.d.ts CHANGED
@@ -41,6 +41,8 @@ export interface Pane {
41
41
  readonly ctx: WidgetContext;
42
42
  readonly canSearch: boolean;
43
43
  load(symbol: string, resolution: Resolution): Promise<void>;
44
+ /** Every time in this pane in `timeZone` from now on. */
45
+ setDisplayTimezone(timeZone: string): void;
44
46
  destroy(): void;
45
47
  }
46
48
  export declare function createPane(shell: Shell, config: PaneConfig): Pane;
@@ -45,7 +45,9 @@ export interface TradingChartOptions extends Omit<ChartOptions, 'datafeed'> {
45
45
  chartType?: ChartType;
46
46
  /**
47
47
  * Funnest logo badge in the bottom-left corner of the chart, linking to charts.funnest.xyz.
48
- * Default true. Free to turn off (Apache-2.0); keeping it on is how you say thanks.
48
+ * Default true. It is how a product meets the attribution notice in NOTICE (Apache-2.0
49
+ * Section 4(d)); turned off, show "Charts by Funnest" with a link to https://charts.funnest.xyz/
50
+ * on or next to every chart yourself.
49
51
  */
50
52
  attribution?: boolean;
51
53
  /**
@@ -102,6 +104,8 @@ export interface TradingChart {
102
104
  setSymbol(symbol: string, resolution?: Resolution): Promise<void>;
103
105
  setResolution(resolution: Resolution): Promise<void>;
104
106
  setLocale(locale: Locale): void;
107
+ /** Times in `timeZone` (IANA, e.g. 'UTC', 'America/New_York') from now on. */
108
+ setDisplayTimezone(timeZone: string): void;
105
109
  /** Override theme tokens (kept across light/dark switches). */
106
110
  setTheme(theme: Partial<ThemeTokens>): void;
107
111
  setColorScheme(scheme: ColorScheme): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnest/charts-ui",
3
- "version": "0.11.10",
3
+ "version": "0.11.12",
4
4
  "description": "Pro trading UI (toolbar, drawing tools, sheets) for Funnest Charts. Framework-agnostic.",
5
5
  "keywords": [
6
6
  "chart",
@@ -42,7 +42,7 @@
42
42
  "NOTICE"
43
43
  ],
44
44
  "dependencies": {
45
- "@funnest/charts": "0.11.10"
45
+ "@funnest/charts": "0.11.12"
46
46
  },
47
47
  "devDependencies": {
48
48
  "preact": "^11.2.0"