https://github.com/davidgtonge/react-spiral
Spiral charts in React
https://github.com/davidgtonge/react-spiral
canvas d3 react react-motion spiral
Last synced: 27 days ago
JSON representation
Spiral charts in React
- Host: GitHub
- URL: https://github.com/davidgtonge/react-spiral
- Owner: davidgtonge
- Created: 2017-06-05T21:50:47.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T07:53:02.000Z (over 3 years ago)
- Last Synced: 2025-06-14T10:39:54.968Z (12 months ago)
- Topics: canvas, d3, react, react-motion, spiral
- Language: JavaScript
- Homepage: https://weather-spiral.davetonge.co.uk/
- Size: 3.36 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### React Spiral
This is a React component for displaying spiral charts.
It uses D3.js for some of the calculations, but all rendering is handled via React.
There is a demo here: https://spiral.tonge.org/
There are two rendering modes: SVG and Canvas.
Because many spiral charts will have large amounts of data points - the canvas
implementation is the default and provides the best performance.
The component has animation by default, however it's performance may not be
adequate when dealing with large datasets.
The API is fairly simple:
```javascript
"red"}
width={600}
height={600}
offset={100}
segment={[15,2]} // Size of each data point in pixels
opacity={(val) => 0.5},
extent={[0,360]} // The min and max x values
/>
```