Skip to content

Instantly share code, notes, and snippets.

export const BarData = [
{
name: "Page A",
uv: 4000,
pv: 2400,
amt: 2400,
},
{
name: "Page B",
uv: 3000,
import * as React from "react";
import { Dimensions, View } from "react-native";
import { color } from "../../assets/colorConstant";
import { YAxis,BarChart, XAxis } from "../../src";
import {
moderateScale,
moderateScaleVertical,
textScale,
} from "../../assets/responsiveSize";
import { Svg, Line } from "react-native-svg";
import * as array from "d3-array";
import * as scale from "d3-scale";
import * as shape from "d3-shape";
import PropTypes from "prop-types";
import React, { PureComponent } from "react";
import { View } from "react-native";
import Svg from "react-native-svg";
import RoughPath from '../roughPath'
class BarChart extends PureComponent {
state = {
import React, { useCallback } from "react";
import PropTypes from "prop-types";
import { Path as SvgPath } from "react-native-svg";
import { useRough } from "../hooks";
const RoughPath = ({ onPress,d, ...o }) => {
const generator = useRough(o);
const paths = generator.toPaths(generator.path(d, o));
return (