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

issues arising from https://github.com/IsaKiko/D3-visualising-data/pull/27 #28

Open
IsaKiko opened this issue Aug 6, 2015 · 1 comment

Comments

@IsaKiko
Copy link
Owner

IsaKiko commented Aug 6, 2015

PR #27 will result in the following changes in the rest of the repo

include in css file:
svg {
border: 5px solid red;
}

change in js files:

  • var margin = {top: 21.5, right: 21.5, bottom: 21.5, left: 39.5};
  • refreshData(); update() --> refreshData
  • include solution for automatic check boxes

lesson notes:
write up and explain solution for automatic checkboxes (optional)

cc @twitwi

@twitwi
Copy link
Contributor

twitwi commented Aug 6, 2015

this might help

    //var region_names = ["Sub-Saharan Africa", "South Asia", "Middle East & North Africa", "America", "East Asia & Pacific", "Europe & Central Asia"];
    var region_names = nations.map(function(d) { return d.region; });
    region_names = d3.set(region_names).values();
    for (i in region_names) {
        var lab = d3.select("body").append("label");
        lab
            .append("input")
            .attr("type", "checkbox")
            .attr("class", "region_cb")
            .attr("value", region_names[i]);
        lab.append("span").text(region_names[i]);
        lab.append("br");
        //d3.select("body").append("span").html(region_names[i]);
    }

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

No branches or pull requests

2 participants