Commit 47988f20 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix tooltip on edge

parent b44982d3
...@@ -1499,7 +1499,7 @@ ...@@ -1499,7 +1499,7 @@
// don't show tooltip when no data // don't show tooltip when no data
if (dataToShow.length === 0) { return; } if (dataToShow.length === 0) { return; }
// Construct tooltip // Construct tooltip
tooltip.html(__tooltip_contents(selectedData, getXAxisTickFormat(), valueFormat, color)); tooltip.html(__tooltip_contents(selectedData, getXAxisTickFormat(), valueFormat, color)).style("display", "block");
// Get tooltip dimensions // Get tooltip dimensions
tWidth = tooltip.property('offsetWidth'); tWidth = tooltip.property('offsetWidth');
tHeight = tooltip.property('offsetHeight'); tHeight = tooltip.property('offsetHeight');
...@@ -1532,8 +1532,7 @@ ...@@ -1532,8 +1532,7 @@
// Set tooltip // Set tooltip
tooltip tooltip
.style("top", tooltipTop + "px") .style("top", tooltipTop + "px")
.style("left", tooltipLeft + 'px') .style("left", tooltipLeft + 'px');
.style("display", "block");
} }
function hideTooltip() { function hideTooltip() {
tooltip.style("display", "none"); tooltip.style("display", "none");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment