I have created a D3 barchart and used the following code to allow for user selections.
if(this.hasAttribute("data-value")) {
var value = parseInt(this.getAttribute("data-value"), 10), dim = 0;
self.selectValues(dim, [value], true);
$(this).toggleClass("selected");
I have been able to get the selection box to appear above the object, but all bars in the chart are the same colour.
How do I get the CSS to work so that the bar selected by the user is one colour while the others are another?