react-candlesticks 0.0.4 → 0.0.7
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 +4 -4
- package/dist/components/Chart/Chart.d.ts +2 -1
- package/dist/components/Chart/chartPropTypes.d.ts +1 -0
- package/dist/components/StatefulChart/StatefulChart.d.ts +2 -1
- package/dist/index-CySX_RJP.js +14715 -0
- package/dist/index.js +2 -2
- package/dist/propTypes.js +15 -14
- package/dist/react-candlesticks.css +1 -1
- package/package.json +1 -1
- package/dist/index-Bb_QstiX.js +0 -9443
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/react-candlesticks)
|
|
4
4
|
[](./LICENSE)
|
|
5
|
-
|
|
5
|
+

|
|
6
6
|
[](https://www.npmjs.com/package/react-candlesticks)
|
|
7
7
|
[](https://react.dev/)
|
|
8
8
|
[](https://docs.reactcandlesticks.com/)
|
|
@@ -20,12 +20,10 @@ Build responsive trading charts in React with candlesticks, indicators, crosshai
|
|
|
20
20
|
|
|
21
21
|
[](https://stackblitz.com/edit/react-candlesticks?file=src%2FApp.tsx)
|
|
22
22
|
|
|
23
|
-
[Website](https://reactcandlesticks.com/) • [Documentation](https://docs.reactcandlesticks.com/)
|
|
23
|
+
[Website](https://reactcandlesticks.com/) • [Documentation](https://docs.reactcandlesticks.com/docs/) • [npm](https://www.npmjs.com/package/react-candlesticks) • [Live Demo](https://stackblitz.com/edit/react-candlesticks?file=src%2FApp.tsx)
|
|
24
24
|
|
|
25
25
|
For bugs and feature requests, [open an issue](https://github.com/trendingcandles/react-candlesticks/issues). For usage questions, [start a discussion](https://github.com/trendingcandles/react-candlesticks/discussions/new?category=q-a).
|
|
26
26
|
|
|
27
|
-
---
|
|
28
|
-
|
|
29
27
|
## Installation
|
|
30
28
|
|
|
31
29
|
```bash
|
|
@@ -62,6 +60,8 @@ export default function App() {
|
|
|
62
60
|
|
|
63
61
|
`granularity` is optional if your dataset uses a consistent interval and you want the library to infer it automatically. For empty/loading states, pass `granularity` explicitly.
|
|
64
62
|
|
|
63
|
+
For a fuller walkthrough, see the [Getting Started docs](https://docs.reactcandlesticks.com/docs/getting-started).
|
|
64
|
+
|
|
65
65
|
## Why React Candlesticks?
|
|
66
66
|
|
|
67
67
|
- **Canvas rendering** — smooth zoom, pan, and hover with predictable performance on large datasets
|
|
@@ -19,6 +19,7 @@ interface ChartPropsBase extends Omit<HTMLAttributes<HTMLDivElement>, 'onScroll'
|
|
|
19
19
|
theme?: Theme | ThemeName;
|
|
20
20
|
data: DataPoint[];
|
|
21
21
|
scrollToLatestMargin?: number;
|
|
22
|
+
initialScrollToLatest?: boolean;
|
|
22
23
|
onScroll?: (newScrollOffset: number) => void;
|
|
23
24
|
onZoom?: (newIntervalWidthPx: number) => void;
|
|
24
25
|
}
|
|
@@ -32,5 +33,5 @@ interface PanelsAsChildrenChartProps extends ChartPropsBase {
|
|
|
32
33
|
}
|
|
33
34
|
type PanelsProps = PanelsAsPropChartProps | PanelsAsChildrenChartProps;
|
|
34
35
|
export type ChartProps = ChartPropsBase & PanelsProps;
|
|
35
|
-
declare const _default: import('react').MemoExoticComponent<({ width, height, intervalWidthPx, granularity, backgroundColor, xAxis, grid, crosshairs, theme, panels, data, scrollToLatestMargin, onScroll, onZoom, children, ...props }: ChartProps) => JSX.Element>;
|
|
36
|
+
declare const _default: import('react').MemoExoticComponent<({ width, height, intervalWidthPx, granularity, backgroundColor, xAxis, grid, crosshairs, theme, panels, data, scrollToLatestMargin, initialScrollToLatest, onScroll, onZoom, children, ...props }: ChartProps) => JSX.Element>;
|
|
36
37
|
export default _default;
|
|
@@ -13,6 +13,7 @@ declare const chartPropTypes: {
|
|
|
13
13
|
theme: PropTypes.Requireable<NonNullable<object | ThemeName | null | undefined>>;
|
|
14
14
|
data: PropTypes.Validator<object[]>;
|
|
15
15
|
scrollToLatestMargin: PropTypes.Requireable<number>;
|
|
16
|
+
initialScrollToLatest: PropTypes.Requireable<boolean>;
|
|
16
17
|
onScroll: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
18
|
onZoom: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
19
|
panels: InternalPropTypeValidator;
|
|
@@ -19,8 +19,9 @@ export interface StatefulChartProps {
|
|
|
19
19
|
maxLookback: number;
|
|
20
20
|
maxLookForward: number;
|
|
21
21
|
scrollToLatestMargin: number;
|
|
22
|
+
initialScrollToLatest: boolean;
|
|
22
23
|
onScroll?: (newScrollOffset: number) => void;
|
|
23
24
|
onZoom?: (newIntervalSize: number) => void;
|
|
24
25
|
}
|
|
25
|
-
declare const _default: import('react').MemoExoticComponent<({ chartWidth, chartHeight, intervalSize, granularity, config, panels, layout, indexProvider, dataMap, initialLayersData, maxLookback, maxLookForward, scrollToLatestMargin, onScroll, onZoom, }: StatefulChartProps) => import("react/jsx-runtime").JSX.Element>;
|
|
26
|
+
declare const _default: import('react').MemoExoticComponent<({ chartWidth, chartHeight, intervalSize, granularity, config, panels, layout, indexProvider, dataMap, initialLayersData, maxLookback, maxLookForward, scrollToLatestMargin, initialScrollToLatest, onScroll, onZoom, }: StatefulChartProps) => import("react/jsx-runtime").JSX.Element>;
|
|
26
27
|
export default _default;
|