@overdoser/react-toolkit 0.0.14 → 0.0.16

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.
@@ -52,6 +52,30 @@ export interface TradingChartProps {
52
52
  * here in the future. @default true
53
53
  */
54
54
  showConfigPanel?: boolean;
55
+ /**
56
+ * When `true`, the top cursor-value badge is tinted by bar direction
57
+ * (`upColor` for `close >= open`, `downColor` otherwise) with white text.
58
+ * When `false`, the badge uses the same neutral palette as the bottom
59
+ * datetime badge. @default false
60
+ */
61
+ priceBadgeColorByDirection?: boolean;
62
+ /**
63
+ * When `true`, the top cursor-value badge appends a date (for `'D'` /
64
+ * `'W'` / `'M'` resolutions) or a weekday+date+time (for intraday
65
+ * resolutions) after the price, separated by ` · `. Honours `timezone`.
66
+ * Default formats:
67
+ * - D / W / M → `17 Sep 2025`
68
+ * - intraday → `Wed 17 Sep 14:30`
69
+ * @default false
70
+ */
71
+ priceBadgeShowTime?: boolean;
72
+ /**
73
+ * Optional override for the time portion when `priceBadgeShowTime` is on.
74
+ * Receives the bar's unix-seconds time, the current `resolution`, and the
75
+ * chart's `timezone`. Return whatever string you want appended after the
76
+ * price. Returning an empty string suppresses the suffix for that hover.
77
+ */
78
+ priceBadgeTimeFormat?: (unixSec: number, resolution: Resolution, timezone: Timezone) => string;
55
79
  /** Fired when the crosshair moves (`null` when leaving the chart). */
56
80
  onCrosshair?: (info: CrosshairInfo | null) => void;
57
81
  /** Fired after pan / zoom / data updates. */
@@ -83,7 +107,7 @@ export interface TradingChartProps {
83
107
  * ]}
84
108
  * />
85
109
  */
86
- export declare function TradingChart({ datafeed, symbol, resolution, period, seriesType, indicators, precision, initialLookback, height, upColor, downColor, lineColor, timezone, defaultTimezone, onTimezoneChange, showConfigPanel, onCrosshair, onVisibleRangeChange, className, style, }: TradingChartProps): import("react/jsx-runtime").JSX.Element;
110
+ export declare function TradingChart({ datafeed, symbol, resolution, period, seriesType, indicators, precision, initialLookback, height, upColor, downColor, lineColor, timezone, defaultTimezone, onTimezoneChange, showConfigPanel, priceBadgeColorByDirection, priceBadgeShowTime, priceBadgeTimeFormat, onCrosshair, onVisibleRangeChange, className, style, }: TradingChartProps): import("react/jsx-runtime").JSX.Element;
87
111
  /**
88
112
  * Full crosshair date/time label with a timezone tag.
89
113
  * Format: `YYYY-MM-DD HH:MM:SS <tz>` — `<tz>` is `+HH:MM` for local,