Modification to the Line chart getShape() method request

Share RGraph:  

« 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 Zsolt on 2nd August 2017
Hi Richard,

I'm using multi line chart. Sometimes the lines cross or on each other.
For the proper viewing the user can hide one or more lines, but when I want to show a tooltip sometimes pop up a tooltip of the hidden line, because of the dataset index.

So my suggestion is, to checking in the getShape function the line is hidden or not.

Regards,
Zsolt

My mod (may be not the best, but it works for me):
...
    var dataset = 0;
    var idx = i;
    while ((idx + 1) > this.data[dataset].length) {
       idx -= this.data[dataset].length;
       dataset++;
    }
    if (this.hidden(dataset)) continue;
    return {
...
Posted by Richard on 2nd August 2017
Hi there,

I'll look into it - it sounds as though it would be fine.

Richard
Posted by Richard on 10th August 2017
Hi there,

OK I've added this and it will be in the next version, or you can try the beta that I've just released.

www.rgraph.net/download#beta


Richard

Add a reply




« Back to message list