We wanted to show DHTMLX Pop up as tooltip on a pie chart. Is it possible? Would you have a sample code on how to do it?
I tried following code:
dhtmlxChart.attachEvent(“onMousemove”, function (id, ev, trg)
{
myPop = new dhtmlXPopup();
myPop.hide();
myPop.attachHTML(“hello”);
myPop.show();
});
Pie chart doesn’t throw any error, but doesn’t show pop up box also.
I was hoping to get something like the attached sample. Attached chart is a google chart and if you mouse over the slices the individual pie slice gets highlighted nicely. pie-chart.zip (576 Bytes)
In case of using the popup standlone. You need to define the positions of your showing popUp.
f.ex.: myPop.show(20,20,400,300); //params are: x, y, width, height
Here you can find a tutorial: docs.dhtmlx.com/popup__initiali … standalone
Thanks Sematik it worked, i was missing the positions… Would you have a sample of using DHTMLX pop up for chart tooltips?
I tried following:
dhtmlxChart.attachEvent(“onMousemove”, function (id, ev, trg)
{
myPop = new dhtmlXPopup();
myPop.hide();
myPop.attachHTML(“hello”);
var rect = trg.getBoundingClientRect();
myPop.show(rect.left, rect.top, rect.width, rect.height);
});
dhtmlxChart.attachEvent("onMouseout", function (ev)
{
if (myPop != null)
myPop.hide();
});
It doesn’t look good. Have following issues:
Position… Was trying to put it just outside the slice.
Text: How can i get slice size or label on the pop up.