UNPKG

react-native-gifted-charts

Version:

The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar, Population Pyramid, Radar, Bubble and SCatter charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.

21 lines (20 loc) 902 B
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; import { jsx as _jsx } from "react/jsx-runtime"; import { useCandleStickChart, } from 'gifted-charts-core'; import { BarChart } from '../BarChart'; import { screenWidth } from '../utils'; export var CandleStickChart = function (props) { var _a; var propsCastedToBarChartProps = useCandleStickChart(__assign(__assign({}, props), { parentWidth: (_a = props.width) !== null && _a !== void 0 ? _a : screenWidth })).propsCastedToBarChartProps; return _jsx(BarChart, __assign({}, propsCastedToBarChartProps)); };