Didnt 'key.interactive' and 'tooltips' work simultaneously?

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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 Shastry on 15th April 2013
I need one confirmation.

Didnt 'key.interaction' and 'tooltips' work simultaneously?

When a key is clicked, it will highlight a particular line graph and the else canvas part is faded.

I want a tooltip to appear on this highlighted line without being the Canvas fade out.
Posted by RGraph support on 15th April 2013
Hi there,

I doubt it - tooltips have used the canvas or window onclick event listeners to hide themselves for a long time.

You could try setting the property chart.tooltips.event option to onmousemove - that may work.

Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer
Posted by Shastry on 16th April 2013
Hi,
But there is no tooltips.event property itself. Moreover, i need to work on 'key' rather than tooltips. Isnt it?
Posted by RGraph support on 16th April 2013
Hi there,

The interactive key won't work with click driven tooltips - both use a click to hide themselves so if you click the point/bar/etc or on the key the other gets hidden.



Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer
Posted by Shastry on 16th April 2013
HI,
oh okey, thank you.

Now i'm working on tooltips.overriding.

Have set,
      line.Set('tooltips', fbs,twitters,blogs);
      line.Set('chart.tooltips.override', tooltip_override);
      RGraph.Register(line);

  function tooltip_override (obj, text, x, y, idx, e)
  {
     canvas.style.cursor = 'pointer';
     if (RGraph.Registry.Get('chart.tooltip') && RGraph.Registry.Get('chart.tooltip').__index__ == idx)
     {
      return;
     }

     // Show the tooltip
     RGraph.Tooltip(obj, obj.Get('tooltips')[idx], x, y, idx);
            
     return;

  }

Still the tooltip is not appearing.

Any suggestion?
Posted by RGraph support on 16th April 2013
Hi there,

You ddon't appear to be doing anything other than showing tooltips - so you might as well just use tooltips without the override. Regardless - this is wrong:

line.Set('tooltips', fbs,twitters,blogs);

It should be an array of strings like this:

line.Set('tooltips', ['fbs','twitters','blogs']


Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer
Posted by Shastry on 17th April 2013
HI,

okay leave...

Actually its not wrong, because all those are arrays. They are working properly.

But I can't put all the things here, that I am doing .

Anyhow Thanks for the response.
Posted by RGraph support on 17th April 2013
Hi there,

If you want to concatenate all the arrays you can use the .concat() JavaScript function.



Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer

Add a reply




« Back to message list