Created
May 25, 2016 23:42
-
-
Save exp0nge/81edab8178d30e90f952eb2985404a86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//use our handler | |
genderPieChart | |
.width(180) //setup sizes | |
.height(180) | |
.radius(80) | |
.dimension(genderDim) //use the Crossfilter dimension we setup earlier | |
.group(genderDim.group()); //put this into the gender dimension group | |
genderPieChart.controlsUseVisibility(true); //tell the chart that we want to use anchor tags as resets | |
//setup click events to reset filters for the reset anchor tag | |
$('#genderPie > a').on('click', function (e) { | |
genderPieChart.filterAll(); | |
dc.redrawAll(); | |
e.preventDefault(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment