Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bill Votes Chart #8

Open
ndarville opened this issue Oct 4, 2013 · 1 comment
Open

Bill Votes Chart #8

ndarville opened this issue Oct 4, 2013 · 1 comment
Labels

Comments

@ndarville
Copy link
Owner

bill-votes

@ndarville
Copy link
Owner Author

Similar to Relative budget chart:

  • Create majority divider

Dissimilar:

  • AYE/NAY header to the left of bar
  • Cumulative bars in different colours
// domain = [0, 35, 65, 90, 100]
// range = [0, 315]

// domain = [0, 35, 100, 190, 290]
// range = [0, 420]

g.selectAll("rect")
    .data(xScale.range().map(function(d, i) {
        return {
            x0: i ?
                x(xScale.domain()[i - 1]) :  // x([0, 35, 65, 90, 100][i - 1])
                x.range()[0],  // 0
            x1: i < xScale.domain().length ?
                x(xScale.domain()[i]) :  // x([0, 35, 65, 90, 100][i])
                x.range()[1],  // 315
            z: d
        };
    }))
    // (...)

@ndarville ndarville removed the focus label Mar 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant