Commit e5e133c4 authored by Almouhannad Hafez's avatar Almouhannad Hafez

Fix tooltip position

parent 7879266f
......@@ -128,11 +128,11 @@ export class PieChart extends Chart {
vis.tooltip.style('opacity', .9).style('display', 'block');
vis.tooltip.html(`${d.data.key}<br>Total Medals: ${d.data.value}`)
.style('left', (event.pageX - 20) + 'px')
.style('top', (event.pageY - 85) + 'px');
.style('top', (event.pageY - 65) + 'px');
})
.on("mousemove", function (event: any) {
vis.tooltip.style('left', (event.pageX - 20) + 'px')
.style('top', (event.pageY - 85) + 'px');
.style('top', (event.pageY - 65) + 'px');
})
.on("mouseout", function () {
// Reset opacity of all arcs
......
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