Fix raster example tooltips
This commit is contained in:
@@ -195,18 +195,18 @@ function plot(resolution, counts, threshold) {
|
|||||||
}
|
}
|
||||||
tip.html(message(counts.min + index * counts.delta, area));
|
tip.html(message(counts.min + index * counts.delta, area));
|
||||||
tip.style('display', 'block');
|
tip.style('display', 'block');
|
||||||
tip.transition().style({
|
tip
|
||||||
left: chartRect.left + index * barWidth + barWidth / 2 + 'px',
|
.transition()
|
||||||
top: d3.event.y - 60 + 'px',
|
.style('left', chartRect.left + index * barWidth + barWidth / 2 + 'px')
|
||||||
opacity: 1,
|
.style('top', d3.event.y - 60 + 'px')
|
||||||
});
|
.style('opacity', 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
bar.on('mouseout', function () {
|
bar.on('mouseout', function () {
|
||||||
tip
|
tip
|
||||||
.transition()
|
.transition()
|
||||||
.style('opacity', 0)
|
.style('opacity', 0)
|
||||||
.each('end', function () {
|
.on('end', function () {
|
||||||
tip.style('display', 'none');
|
tip.style('display', 'none');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user