tooltip2 = {
chart2
const tooltip2 =
d3.select('body').append('div')
.attr('class', 'tooltip')
.style('position', 'absolute')
.style('visibility', 'hidden').text('ege')
d3.selectAll("circle")
.on("mouseover", function(d){
d3.select(this).transition().attr('stroke-width', "3px").attr("stroke","red")
})
.on("mousemove", function(d){
return tooltip2
.html(`\
<b>Institution:</b> ${d.Institution_name}<br />\
<b>Date:</b> ${d3.timeFormat('%Y-%m-%d')(d.Date_order)}<br />\
<b>Price per Mask:</b> ${d.cal_unit_price}<br />\
<b>Total Quantity:</b> ${d.amount}<br />\
<b>Order Amount in Rand:</b> ${d.order_num}<br />\
`)
.style("top", (d3.event.pageY-10)+"px")
.style("left",(d3.event.pageX+20)+"px")
.style("visibility", "visible");
})
.on("mouseout", function(){
d3.select(this).transition().attr('stroke-width',"0px")
return tooltip2.html(``).style("visibility", "hidden");
})
}