1.1.4 ā€¢ Published 4 years ago

react-use-brush v1.1.4

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

brush hook with a nice api to brush and filter your chart data

Install

npm i -S react-use-brush

Usage

You can try a live demo here: https://codesandbox.io/s/nervous-rosalind-kfxeq

const Chart = () => {
  const [state, rect, rectRef, bind, selection] = useBrush();
  // ...

  return (
    <>
      <svg {...bind} width={width} height={height}>
        <rect
          {...rect}
          ref={rectRef}
          fill="none"
          stroke="black"
          pointerEvents="all"
        />
      </svg>
    </>
  );
};

Run tests

npm i
npm build
npm test

Author

šŸ‘¤ DavidSanwald

Show your šŸ’š

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2019 DavidSanwald. This project is MIT licensed.


1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.0

4 years ago

0.2.0

4 years ago