mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-22 22:27:17 +00:00
fix: [heatmap] fix tooltip position
This commit is contained in:
parent
61bccecdab
commit
6a24c58c8b
1 changed files with 5 additions and 0 deletions
5
var/www/static/js/d3/heatmap_week_hour.js
vendored
5
var/www/static/js/d3/heatmap_week_hour.js
vendored
|
@ -50,7 +50,12 @@ const create_heatmap_week_hour = (container_id, data, options) => {
|
|||
.style("stroke", "black")
|
||||
//.style("stroke-opacity", 1)
|
||||
|
||||
var xPosition = d3.mouse(this)[0] + margin.left;
|
||||
var yPosition = d3.mouse(this)[1] + margin.top + window.scrollY + 100;
|
||||
|
||||
tooltip.html(d.date + " " + d.hour + "-" + (d.hour + 1) + "h: <b>" + d.count + "</b> messages")
|
||||
.style("left", xPosition + "px")
|
||||
.style("top", yPosition + "px");
|
||||
}
|
||||
const mouseleave = function(d) {
|
||||
tooltip.style("opacity", 0)
|
||||
|
|
Loading…
Reference in a new issue