Ok, I used this SetTooltip instead of beginTooltip which I usually use and it works.
if CImGui.IsItemHovered()
region_x = Cint(div(length(x)*(io.MousePos.x - pos.x),img_width)+1)
CImGui.SetTooltip(@sprintf("X = %g m \n B = %.2f", x[region_x], Bplane[region_x]))
end
Thank you. Still have problem with Greek characters, if you could help, here’s my other problem CImGui Greek Characters.