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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/react-candlesticks)](https://www.npmjs.com/package/react-candlesticks)
4
4
  [![license](https://img.shields.io/npm/l/react-candlesticks)](./LICENSE)
5
- [![bundle size](https://img.shields.io/bundlephobia/minzip/react-candlesticks)](https://bundlephobia.com/package/react-candlesticks)
5
+ ![bundle size](https://badgen.net/bundlejs/minzip/react-candlesticks)
6
6
  [![types included](https://img.shields.io/badge/types-included-3178C6?logo=typescript&logoColor=white)](https://www.npmjs.com/package/react-candlesticks)
7
7
  [![react 18%2B](https://img.shields.io/badge/react-18%2B-61DAFB?logo=react&logoColor=white)](https://react.dev/)
8
8
  [![docs](https://img.shields.io/badge/docs-reactcandlesticks.com-0A66C2)](https://docs.reactcandlesticks.com/)
@@ -20,12 +20,10 @@ Build responsive trading charts in React with candlesticks, indicators, crosshai
20
20
 
21
21
  [![StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](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;