loading words...

Mar 04, 2019 23:05:51

towards a real cool thing

by @swizecteller | 245 words | 🐣 | 116💌

Swizec Teller

Current day streak: 0🐣
Total posts: 116💌
Total words: 32303 (129 pages 📄)

This is me buildign and discoverign a cool thign as told through tweets. Wonder if it comes up to 200 words let's see


This is actually donut chart with an obscene radius

🧙‍♂️

https://twitter.com/Swizec/status/1102711868085350400


A less obscene radius (10,000 instead of 1,000,000) fixes weird arcs in the middles

But now you can see the curve

https://twitter.com/Swizec/status/1102746630388768768


29,905 pixel radius is the highest this trick will go

At 29906 the middle breaks

I wonder if this is a bug in @d3js_org's arc generator or I'm abusing maths too much 🤔

@micahstubbs @mbostock @sxywu you think I'm doing a division by zero or something with this trick?

https://twitter.com/Swizec/status/1102747647864037379


Oh like the browser misinterpreting the path definition? Hmmm didn't think of that

@mbostock you were right! This only breaks on browsers using the Chrome engine. Firefox and Safari work great :D


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

https://twitter.com/Swizec/status/1102818340991430656


And the result is totally epic. You can transition a donut chart to a bar chart

🤘

https://twitter.com/Swizec/status/1102818342711128064


Here's a better version this is wild I won't be able to sleep tonight

Bar charts are just very very big donut charts. My mind is blown I honestly didn't think this would work

https://twitter.com/Swizec/status/1102825974461161472

contact: email - twitter / Terms / Privacy