Migrate to d3 v6
This commit is contained in:
@@ -87,10 +87,10 @@ $(document).on('turbolinks:load', function() {
|
||||
.enter()
|
||||
.append("rect")
|
||||
.attr("class", "value-bar")
|
||||
.on("mousemove", function (d) {
|
||||
.on("mousemove", function (event, d) {
|
||||
tooltip
|
||||
.style("left", d3.event.pageX - 50 + "px")
|
||||
.style("top", d3.event.pageY + 50 + "px")
|
||||
.style("left", event.pageX - 50 + "px")
|
||||
.style("top", event.pageY + 50 + "px")
|
||||
.style("display", "inline-block")
|
||||
.html("<%= I18n.t('activerecord.models.exercise.one') %> ID: " + d.exercise_id + "<br>" +
|
||||
"<%= I18n.t('activerecord.attributes.exercise.title') %>: " + d.exercise_title + "<br>" +
|
||||
@@ -99,7 +99,7 @@ $(document).on('turbolinks:load', function() {
|
||||
.on("mouseout", function () {
|
||||
tooltip.style("display", "none");
|
||||
})
|
||||
.on("click", function (d) {
|
||||
.on("click", function (_event, d) {
|
||||
Turbolinks.visit("/exercises/" + d.exercise_id + "/statistics");
|
||||
})
|
||||
.attr("x", function (d) {
|
||||
|
Reference in New Issue
Block a user