Tooltip with dynamic height depending on text to display
This commit is contained in:
parent
73536d4871
commit
c1d8b95aa0
@ -263,7 +263,7 @@ function createLineGraph(containerId, raceData){
|
|||||||
tooltipGroup.append("rect")
|
tooltipGroup.append("rect")
|
||||||
.attr("style", "fill:rgb(225,225,225);stroke:black;stroke-width:2;")
|
.attr("style", "fill:rgb(225,225,225);stroke:black;stroke-width:2;")
|
||||||
.attr("width", "150")
|
.attr("width", "150")
|
||||||
.attr("height", "100")
|
.attr("height", (textArr.length + 1) + "em")
|
||||||
.attr("x", function() { return x(d.lap) + 10; })
|
.attr("x", function() { return x(d.lap) + 10; })
|
||||||
.attr("y", function() { return y(d.position) + 10; });
|
.attr("y", function() { return y(d.position) + 10; });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user