Horje
d3 toggle on click Code Example
d3 toggle on click
var heatMap = svg.selectAll(".hour")
          .data(data)
          .enter().append("rect")
          .attr("x", function(d) { return (d.hour - 1) * gridSize; })
          .attr("y", function(d) { return (d.day - 1) * gridSize; })
          .attr("rx", 4)
          .attr("ry", 4)
          .attr("class", "hour bordered")
          .attr("width", gridSize)
          .attr("height", gridSize)
          .style("fill", colors[0])
          .on("click", function() {
            d3.select(this).classed("myCssClass", d3.select(this).classed("myCssClass") ? false : true);
          });




Whatever

Related
Place cursor at the end of the text Code Example Place cursor at the end of the text Code Example
Creating a model - Contact Code Example Creating a model - Contact Code Example
nlkjlkjkl Code Example nlkjlkjkl Code Example
@android:color/system_neutral1_1000 Code Example @android:color/system_neutral1_1000 Code Example
google kubernetes engine Code Example google kubernetes engine Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10