You take a React component, use props as a staging area, render from state, and use componentDidMount or useEffect to hand rendering control over to D3. Call tState 60 times per second and your React component animates. ![]() React for Data Visualization and my workshop teach you about two ways to animate in dataviz: You can combine the two approaches to animation I teach in React for Data Visualization I just discovered a new approach to React + D3 transitions □ Of course this happens juuuust when I think React for Data Visualization is complete Check this out, it combines the "game loop via state changes" with the "D3 runs transitions" approach /mMglR4hDwp- Swizec Teller writing a book on software rewrites March 5, 2019 You put the hardest things off as long as you can get away with □ No idea how to pull that off so I built eeeeverything else first. They asked me to build a smooth transition from a donut-shaped visualization to a bar chart shape. That gave me an idea for a client project I've been working on. It's because the curve is soooooooo big that it looks flat. Why do flat earth people believe the earth is flat? ![]() Apparently there's a scene where they confidently disprove their own theory and it's pure gold. Sure, I haven't watched it yet but the twitter buzz put flatearthers on my mind. I actually got the idea from that flat earth documentary on Netflix. Same component, same React code, different radius. It's a donut chart that transitions to a bar chart. ![]() And I got the idea from the flat earth society. Last night I built something so cool it's still blowing my mind.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |