Problem with tooltip in Bar Chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Beige
Newbie
Newbie
Posts: 25
Joined: Wed Jun 28, 2006 12:00 am

Problem with tooltip in Bar Chart

Post by Beige » Thu Mar 25, 2010 12:38 pm

In my ASP.net web page I have multiple charts of style bar. I want to show tooltip when mouse hovered on a bar, shows the Y value of the bar. For each chart I am doing the things like –

Steema.TeeChart.Styles.Bar barD = new Steema.TeeChart.Styles.Bar();
chart.Series.Add(barD);
.
.
.
Steema.TeeChart.Tools.SeriesHotspot seriesHotspot1 = new
Steema.TeeChart.Tools.SeriesHotspot(chart);
seriesHotspot1.Style = Steema.TeeChart.Styles.MarksStyles.Label;
seriesHotspot1.Series = barD;

On mouse hover tooltip for each bar is visible. Well and good. But the issue is that the tooptip always reflects value from the first chart.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Problem with tooltip in Bar Chart

Post by Sandra » Fri Mar 26, 2010 12:36 pm

Hello Beige,

I couldn't reproduce your problem. I have made a simple example using two Charts. Please modifier code, because we can reproduce your problem exactly here:

Code: Select all

 protected Steema.TeeChart.Styles.Bar bar1,bar2,bar3;
    protected Steema.TeeChart.Tools.SeriesHotspot SeriesHotspot1, SeriesHotspot2, SeriesHotspot3;
    protected void Page_Load(object sender, EventArgs e)
    {
        bar1 = new Steema.TeeChart.Styles.Bar(WebChart1.Chart);
        bar2 = new Steema.TeeChart.Styles.Bar(WebChart2.Chart);
        bar3 = new Steema.TeeChart.Styles.Bar(WebChart1.Chart);
        bar1.FillSampleValues();
        bar2.FillSampleValues();
        bar3.FillSampleValues();
        SeriesHotspot1 = new Steema.TeeChart.Tools.SeriesHotspot(WebChart1.Chart);
        SeriesHotspot2 = new Steema.TeeChart.Tools.SeriesHotspot(WebChart2.Chart);
        SeriesHotspot3 = new Steema.TeeChart.Tools.SeriesHotspot(WebChart1.Chart);
        SeriesHotspot1.Series = bar1;
        SeriesHotspot2.Series = bar2;
        SeriesHotspot3.Series = bar3;
    }

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply