My tooltips don't work with negative values on a Line chart

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Camilato on 1st January 2016
Hi Ralph,

First of all I want to thank the great work you have done.

I need your help for resolve tooltips in negative values in the line graph.

Here is the address to my exemple:
Posted by Richard on 1st January 2016

Since you haven't specified I'll assume the issue is that the negative tooltips aren't showing. ISTR a similar post about this and the issue was the stacking order (the drawing API objects were being placed over the Line chart). So you can see if this is the same issue by commenting out all of the drawing API objects .


You could move your first Line chart down in the src code so it's just before the other Line chart (and after all of the drawing API objects).

Posted by Camilato on 1st January 2016
Hi Richard,

I think with found the location of the problem.

         * The getObjectByXY() worker method. Don't call this call:
         * RG.ObjectRegistry.getObjectByXY(e)
         * @param object e The event object
         this.getObjectByXY = function (e)
             //var ca = this.canvas;
             //var prop =;
             var mouseXY = RG.getMouseXY(e);
             // The 5 is so that the cursor doesn't have to be over the graphArea to trigger the hotspot
             if (
                    (mouseXY[0] > prop['chart.gutter.left'] - 5)
                 && mouseXY[0] < (ca.width - prop['chart.gutter.right'] + 5)
                 && mouseXY[1] > (prop[''] - 5)
                 && mouseXY[1] < (ca.height - prop['chart.gutter.bottom'] + 5)
                 ) {
                 return this;

I think it may be because subtraction height gutter bottom, then the area where the event listening mouse movement is not found to the underside. That's because to use the chart with a negative value and multiple lines has multiple instances of line graph with background. Now I do not know if the way I did to have multiple lines with the possibility of negative values is correct that way implemented for me. I reference the combination of two examples of the site to be able to make a graphic with multiple line and accept negative values.


Add a reply

« Back to message list