ToolTip

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
Bruce
Newbie
Newbie
Posts: 10
Joined: Wed Aug 26, 2020 12:00 am

ToolTip

Post by Bruce » Thu Dec 17, 2020 12:43 pm

Hi,

Is there a way of making the tooltip popup for only one series?

Thanks
Bruce

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ToolTip

Post by Yeray » Mon Dec 21, 2020 10:50 am

Hello,

You could modify the ToolTip refresh function as follows:

Code: Select all

      for (i = 0; i < 3; i++) {
        Chart1.addSeries(s = new Tee.Line().addRandom(15));
      }

      var tooltip = new Tee.ToolTip(Chart1);
      Chart1.tools.add(tooltip);
      
      tooltip.old_refresh=tooltip.refresh;
      
      tooltip.refresh = function(series,index) {
        if (series == Chart1.series.items[1]) {  // this will only show the tooltip for the series index 1
          tooltip.old_refresh(series,index);
        }
      }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bruce
Newbie
Newbie
Posts: 10
Joined: Wed Aug 26, 2020 12:00 am

Re: ToolTip

Post by Bruce » Tue Dec 22, 2020 8:50 am

Thanks, that works perfectly.
Bruce

Post Reply