Posts

Showing posts with the label BiggerBidget

D3Js Exploding Pie Chart Part 1

    With one of my current projects, I have been working on creating a way for users to click on individual pieces of a pie chart and slightly pull out that portion. It's a small and pointless feature, something I like to call eye candy in the front-end world.  For people some people it illustrates the content better. I found myself interested in UX. It's fun for me to recreate in d3js since the problem is challenging. Problem    This isn't a math problem but more of svg drawing problem, at the point where d3js draws out the pie chart there is some calculations to the index to see it out of order but if I can understand the method being used then I can modify it to include the exploding property. var explode = function ( x , index ) { var offset = 80 ; var angle = ( x . startAngle + x . endAngle ) / 2 ; var xOff = Math . sin ( angle )* offset ; var yOff = - Math . cos ( angle )* offset ; return "translate(" + xOff + ","

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql