Rose3D and tooltips

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 Kory on 5th February 2016
Hi
I just started using rgarph. I'd like to add tooltips to rose3d. This is my code:
     window.onload = function ()
     {
         var rose = new RGraph.Rose({
             id: 'cvs',
             data:[[22,33],[22,33],[22,33],[22,33]],
             options: {
                 strokestyle: 'rgba(0,0,0,0)',
                 margin: 7,
                 variant: 'stacked3d',
                 variantThreedDepth: 10,
                 labelsAxes: 'e',
                 colors: ['Gradient(#afa:green)','gradient(#aaf:#ddf)'],
                 labels: ['aa aaa','bb','cc','dd'],
                 labelsCount: 0,
                 textSize: 8,
                 tooltips: [
                     'Bill','Bill',
                     'Kevin','Kevin',
                     'Luis','Luis',
                     'Pete','Pete'
                 ],
                 tooltipsEvent: 'onmousemove',
             }
         }).draw();

1. tooltips are under chart - is it possible to change z-index somehow (or is there other solution)?
2. Is it possible to break line in labels?
3. I set labelsCount: 0 but "0" is still visible, how to hide this?
Posted by Richard on 5th February 2016
Hi,

> 1. tooltips are under chart - is it possible to change z-index somehow (or is there other
> solution)?

Sure, you can add a CSS class:

.RGraph_tooltip {
     z-index: 999;
}

The hit detection for tooltips on the 3D Rose chart isn't perfect because of the stretching effect that's necessary.

> 2. Is it possible to break line in labels?

Yes - use \r\n

> 3. I set labelsCount: 0 but "0" is still visible, how to hide this?

You need to set labeslAxes to '' instead of 'e' (ie an empty string).




Richard
Posted by Kory on 7th February 2016
2. and 3. works as you have written
but 1. I needed to add !important at the end to work
Thank You for your fast answer :)
Posted by Richard on 7th February 2016
Hi,

> but 1. I needed to add !important at the end to work

My mistake.




Richard

Add a reply




« Back to message list