Skip to content

Pie chart#5

Open
spencer516 wants to merge 15 commits intomasterfrom
pie-chart
Open

Pie chart#5
spencer516 wants to merge 15 commits intomasterfrom
pie-chart

Conversation

@spencer516
Copy link
Contributor

Begin making the pieces to construct a pie chart.

Like we did with Path interpolation, we need to lovingly borrow from D3 for constructing the path pieces for pie charts from D3 here: https://github.com/mbostock/d3/blob/master/src/svg/arc.js

@bdvholmes — is this something you're at all interested in tackling?

@ghost
Copy link

ghost commented Aug 14, 2015

@spencer516 yeah for sure

@ghost
Copy link

ghost commented Aug 17, 2015

I've made a fair stab at bringing over the svg commands for constructing an arc ⛵. I've added commands classes because argument length was probably a bit lazy.

Disappointingly it looks like the SVG and Canvas specs for Arc are completely different. It looks like the Canvas one is more basic and will need some x and y rotation to match the svg spec commands we have from d3.

@spencer516
Copy link
Contributor Author

Ah interesting. Yea, I had only briefly looked at the corresponding specs and thought they looked similar; at the second pass, yea, I see what you mean.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't need quotes

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks a bit icky with just the one entry not having quotes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well technically you have 2 entries without quotes and 4 with. It might look better this way:

activeState: {
  x: 0,
  y: 0,
  angle: 0,
  'start-angle': 0,
  'inner-radius': 0,
  'outer-radius': null
}

@elwayman02
Copy link
Contributor

Needs rebase

Spencer added 6 commits September 2, 2015 21:37
Is this becoming too much of a behemoth helper? :-|
Give it start/end percentages; converts to radian based range. Defaults to [0, 2*PI]
@ghost ghost force-pushed the pie-chart branch from 0ef875e to 651ed3d Compare September 3, 2015 04:48
@ghost
Copy link

ghost commented Sep 3, 2015

Rebased

@ghost ghost force-pushed the pie-chart branch from 651ed3d to 1ae312c Compare September 3, 2015 05:09
@ghost
Copy link

ghost commented Sep 3, 2015

screen shot 2015-09-02 at 11 07 32 pm

@ghost
Copy link

ghost commented Sep 3, 2015

😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱 😱

pies

@spencer516
Copy link
Contributor Author

That is amazing.

@fsmanuel
Copy link

What's blocking the merge?

@ghost
Copy link

ghost commented Sep 21, 2015

@fsmanuel currently needs implementing in canvas, there's some kind of extra layer we need to go from svg commands to canvas commands for arcs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants