Reputation: 1499
I'm trying to get the key value when clicking on a bar chart in dc.js (I want to use this value when opening a new page) I've used the following (commented out bits!) but cannot get the key value I'm after, I thought it would be d.key? What am I missing?
chart.renderlet(function(chart) {
chart.selectAll('rect').on("click", function(d) {
console.log("click!", d);
// return d.key;
// id=d.key;
// window.location = "information.php?id="+id;
});
});
Upvotes: 0
Views: 884