Skip to content

Instantly share code, notes, and snippets.

@exp0nge
Created May 25, 2016 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exp0nge/81edab8178d30e90f952eb2985404a86 to your computer and use it in GitHub Desktop.
Save exp0nge/81edab8178d30e90f952eb2985404a86 to your computer and use it in GitHub Desktop.
//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