@wick-charts/react 0.2.1 → 0.2.3
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/README.md +10 -12
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +5 -11
- package/dist/index.js +195 -197
- package/package.json +28 -3
- package/src/BarSeries.tsx +107 -0
- package/src/CandlestickSeries.tsx +107 -0
- package/src/ChartContainer.tsx +427 -0
- package/src/LineSeries.tsx +110 -0
- package/src/PieSeries.tsx +59 -0
- package/src/ThemeContext.tsx +21 -0
- package/src/context.ts +13 -0
- package/src/index.ts +120 -0
- package/src/store-bridge.ts +100 -0
- package/src/ui/Crosshair.tsx +61 -0
- package/src/ui/InfoBar.tsx +194 -0
- package/src/ui/Legend.tsx +274 -0
- package/src/ui/NumberFlow.tsx +118 -0
- package/src/ui/PieLegend.tsx +152 -0
- package/src/ui/PieTooltip.tsx +204 -0
- package/src/ui/Sparkline.tsx +214 -0
- package/src/ui/TimeAxis.tsx +112 -0
- package/src/ui/Title.tsx +62 -0
- package/src/ui/Tooltip.tsx +324 -0
- package/src/ui/YAxis.tsx +122 -0
- package/src/ui/YLabel.tsx +167 -0
package/dist/index.d.ts
CHANGED
|
@@ -538,7 +538,7 @@ export declare class ChartInstance extends EventEmitter<ChartEvents> {
|
|
|
538
538
|
* — vertical padding only affects the Y-range computation, so touching it
|
|
539
539
|
* shouldn't reset the user's zoom / auto-scroll state. This matters when
|
|
540
540
|
* a wrapper re-applies padding reactively (e.g. in response to a Title /
|
|
541
|
-
*
|
|
541
|
+
* InfoBar ResizeObserver).
|
|
542
542
|
*/
|
|
543
543
|
setPadding(padding: ChartOptions['padding']): void;
|
|
544
544
|
/** Show or hide the background grid. Takes effect on the next render frame. */
|
|
@@ -1599,7 +1599,7 @@ export declare type TimeValue = number | Date;
|
|
|
1599
1599
|
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Chart title / subtitle bar rendered as a flex row above the chart canvas
|
|
1602
|
-
* (above {@link
|
|
1602
|
+
* (above {@link InfoBar} when both are present). Hoisted out of the
|
|
1603
1603
|
* overlay layer by {@link ChartContainer}, so browser flex layout reserves
|
|
1604
1604
|
* its height and ResizeObserver drives a Y-range recompute.
|
|
1605
1605
|
*
|
|
@@ -1608,7 +1608,7 @@ export declare type TimeValue = number | Date;
|
|
|
1608
1608
|
* ```tsx
|
|
1609
1609
|
* <ChartContainer>
|
|
1610
1610
|
* <Title sub="Live Candlestick">BTC/USD</Title>
|
|
1611
|
-
* <
|
|
1611
|
+
* <InfoBar />
|
|
1612
1612
|
* <CandlestickSeries data={data} />
|
|
1613
1613
|
* ...
|
|
1614
1614
|
* </ChartContainer>
|
|
@@ -1637,18 +1637,12 @@ export declare interface TitleProps {
|
|
|
1637
1637
|
*/
|
|
1638
1638
|
export declare function Tooltip({ sort, format, children }: TooltipProps): JSX_2.Element | null;
|
|
1639
1639
|
|
|
1640
|
-
/** Fields surfaced to a `Tooltip` / `
|
|
1640
|
+
/** Fields surfaced to a `Tooltip` / `InfoBar` formatter. */
|
|
1641
1641
|
export declare type TooltipField = 'open' | 'high' | 'low' | 'close' | 'volume' | 'value';
|
|
1642
1642
|
|
|
1643
1643
|
/** Signature for the tooltip formatter — single prop, field hint. */
|
|
1644
1644
|
export declare type TooltipFormatter = (value: number, field: TooltipField) => string;
|
|
1645
1645
|
|
|
1646
|
-
/** @deprecated Use {@link InfoBar} instead. */
|
|
1647
|
-
export declare const TooltipLegend: typeof InfoBar;
|
|
1648
|
-
|
|
1649
|
-
/** @deprecated Use {@link InfoBarProps} instead. */
|
|
1650
|
-
export declare type TooltipLegendProps = InfoBarProps;
|
|
1651
|
-
|
|
1652
1646
|
export declare interface TooltipPosition {
|
|
1653
1647
|
left: number;
|
|
1654
1648
|
top: number;
|
|
@@ -1763,7 +1757,7 @@ export declare function useYRange(chart: ChartInstance): YRange;
|
|
|
1763
1757
|
* - Number.MAX_SAFE_INTEGER falls back to scientific notation (>= 1e15)
|
|
1764
1758
|
*
|
|
1765
1759
|
* Consumers can import these directly, or swap them in per-component via the
|
|
1766
|
-
* `format` prop on Tooltip/
|
|
1760
|
+
* `format` prop on Tooltip/InfoBar/YAxis/etc. (see framework wrappers).
|
|
1767
1761
|
*/
|
|
1768
1762
|
/** Signature for a value-to-string formatter (YAxis, YLabel, Pie, Sparkline, NumberFlow). */
|
|
1769
1763
|
export declare type ValueFormatter = (value: number) => string;
|