Marks tips

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

Marks tips

Post by biqpaulson » Tue Feb 14, 2017 8:56 pm

Hello:

I have two issues relating to Marks Tips:

1) For this chart, marks tips work correctly when I hover:
flat.PNG
flat.PNG (15.83 KiB) Viewed 14301 times
But if I add ANY Z depth (either from our code using the "Z depth tool" or from your [very complex] tools dialog), marks no longer display when I hover. Why is this?
WithZ.PNG
WithZ.PNG (18.17 KiB) Viewed 14301 times
2) For this chart:
3dbar.PNG
3dbar.PNG (34.95 KiB) Viewed 14298 times
When I hover over the area marked "A", I see the correct mark tip with the "EFT" (yellow) series displayed.
But when I hover over the area marked "B", I see the incorrect mark tip with the "Breakdown by Check" (blue) series displayed.

It's like B's Z projection is "hitting" the blue series with no regard for the fact that the projection is passing through the yellow series first.

Thanks

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

Re: Marks tips

Post by Sandra » Thu Feb 16, 2017 3:03 pm

Hello biqpaulson,
1) For this chart, marks tips work correctly when I hover:
But if I add ANY Z depth (either from our code using the "Z depth tool" or from your [very complex] tools dialog), marks no longer display when I hover. Why is this?
I have adde the problem you're experiencing to TeeChart.Net bugzilla tracker to fix it to upcoming versions. Here's the link http://bugs.teechart.net/show_bug.cgi?id=1790

Feel free to add your mail to the CC list of the other tickets to be automatically notified when they'll be updated.
2) For this chart:
When I hover over the area marked "A", I see the correct mark tip with the "EFT" (yellow) series displayed.
But when I hover over the area marked "B", I see the incorrect mark tip with the "Breakdown by Check" (blue) series displayed.
It's like B's Z projection is "hitting" the blue series with no regard for the fact that the projection is passing through the yellow series first.
Unfortunately, I can't reproduce the problem you're experiencing here. Could you arrange for us a simple project, where the problem appears because we can reproduce it here?

Thanks in advance,
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

biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

Re: Marks tips

Post by biqpaulson » Fri Feb 17, 2017 5:10 pm

Hello:

I have spend more time tracking down issue #2. Using your demo project, please insert this code at line 390 of Bar_Stackgroup.cs:

#if true
Tools.MarksTip seriesMarksTip;
seriesMarksTip = new Tools.MarksTip(barSeries4.Chart);
seriesMarksTip.MouseDelay = 50;
seriesMarksTip.HideDelay = Int32.MaxValue;
seriesMarksTip.Series = barSeries4;
seriesMarksTip.GetText += new Steema.TeeChart.Tools.MarksTipGetTextEventHandler(this.MarkHandler);

seriesMarksTip = new Tools.MarksTip(barSeries5.Chart);
seriesMarksTip.MouseDelay = 50;
seriesMarksTip.HideDelay = Int32.MaxValue;
seriesMarksTip.Series = barSeries5;
seriesMarksTip.GetText += new Steema.TeeChart.Tools.MarksTipGetTextEventHandler(this.MarkHandler);
#endif

Then, please add this handler to the file as well:

private void MarkHandler(Steema.TeeChart.Tools.MarksTip sender, Steema.TeeChart.Tools.MarksTipGetTextEventArgs e)
{
         System.Diagnostics.Debug.WriteLine(sender.Series.Title);
}

Start the demo and go to the stacked bar demo as shown below:
StackBarMarkIssue.PNG
StackBarMarkIssue.PNG (131.54 KiB) Viewed 14269 times
If you position your mouse where the call-out called "x" point, you will see the following text in the output window of the debugger:

barSeries4
barSeries5
barSeries4
barSeries5
barSeries4
barSeries5
barSeries4

As you can see the series is oscillating between both series. Therefore, you are triggering the call back for both series when the mouse is over the "overlap area" without regard for which series is actually on top.

Is there a way to resolve this? Or to figure out which is overlapped by which?

Thanks

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Marks tips

Post by Christopher » Mon Feb 20, 2017 9:31 am

biqpaulson wrote: Is there a way to resolve this? Or to figure out which is overlapped by which?
I'm afraid I can't reproduce this issue with the latest publicly available version of TeeChart, as can be seen in this short screen video:

https://www.screencast.com/t/FucoV9qVfOxh
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

biqpaulson
Newbie
Newbie
Posts: 93
Joined: Thu Apr 17, 2008 12:00 am

Re: Marks tips

Post by biqpaulson » Mon Feb 20, 2017 3:11 pm

Hi Christopher:

I watched the video, and I saw the same issue. Maybe you don't understand. It was during the second place you moved the mouse. At that point I saw both series4 and series5 printed in the debugger. That is the issue -- how do we tell the difference when the colors overlap, which series we are actually one?

This picture is from your video:
ChristopherTest.PNG
ChristopherTest.PNG (42.43 KiB) Viewed 14258 times
\

Do you see?

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Marks tips

Post by Christopher » Tue Feb 21, 2017 10:49 am

Hello,
biqpaulson wrote: Do you see?
No, not clearly I'm afraid. So I've produced a new Minimal, Complete, and Verifiable example which consists of this code:

Code: Select all

    public Form1()
    {
      InitializeComponent();
      CreateChart();
      InitializeChart();
    }

    TChart tChart1 = new TChart(false);

    private void CreateChart()
    {
      tChart1.Dock = DockStyle.Fill;
      splitContainer1.Panel2.Controls.Add(tChart1);
    }

    private void InitializeChart()
    {
      tChart1.Aspect.Chart3DPercent = 75;

      Bar series1 = new Bar(tChart1.Chart);
      series1.MultiBar = MultiBars.Stacked;
      series1.FillSampleValues(2);

      Bar series2 = new Bar(tChart1.Chart);
      series2.MultiBar = MultiBars.Stacked;
      series2.FillSampleValues(2);


      MarksTip seriesMarksTip1 = new MarksTip(tChart1.Chart);
      seriesMarksTip1.Series = series1;
      seriesMarksTip1.GetText += MarkHandler;

      MarksTip seriesMarksTip2 = new MarksTip(tChart1.Chart);
      seriesMarksTip2.Series = series2;
      seriesMarksTip2.GetText += MarkHandler;

      tChart1[0].Transparency = 20;
      tChart1[1].Transparency = 20;
    }

    private void MarkHandler(Steema.TeeChart.Tools.MarksTip sender, Steema.TeeChart.Tools.MarksTipGetTextEventArgs e)
    {
      System.Diagnostics.Debug.WriteLine(sender.Series.Title);
    }
And which when run gives the results in this video:

https://www.screencast.com/t/h3bh63s02F

Here I can clearly see the problem - where the two bars intersect there is a 'spinning' of the MarksTip tool and the tool does not correctly render its text (value). I have entered this issue with id=1795 into our issue tracking software.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Marks tips

Post by Christopher » Tue Feb 21, 2017 11:08 am

Hello,
Christopher wrote: Here I can clearly see the problem - where the two bars intersect there is a 'spinning' of the MarksTip tool and the tool does not correctly render its text (value). I have entered this issue with id=1795 into our issue tracking software.
Okay, I think I understand what's happened here - the resolution to this issue is to use one MarksTip tool and not two, e.g.

Code: Select all

    private void InitializeChart()
    {
      tChart1.Aspect.Chart3DPercent = 75;

      Bar series1 = new Bar(tChart1.Chart);
      series1.MultiBar = MultiBars.Stacked;
      series1.FillSampleValues(2);

      Bar series2 = new Bar(tChart1.Chart);
      series2.MultiBar = MultiBars.Stacked;
      series2.FillSampleValues(2);


      MarksTip seriesMarksTip1 = new MarksTip(tChart1.Chart);
      //seriesMarksTip1.Series = series1;
      seriesMarksTip1.GetText += MarkHandler;

      //MarksTip seriesMarksTip2 = new MarksTip(tChart1.Chart);
      //seriesMarksTip2.Series = series2;
      //seriesMarksTip2.GetText += MarkHandler;

      tChart1[0].Transparency = 20;
      tChart1[1].Transparency = 20;
    }

    private void MarkHandler(Steema.TeeChart.Tools.MarksTip sender, Steema.TeeChart.Tools.MarksTipGetTextEventArgs e)
    {
      double d = Convert.ToDouble(e.Text);

      if(tChart1[0].YValues.IndexOf(d) > -1)
        System.Diagnostics.Debug.WriteLine(tChart1[0].Title);
      else if(tChart1[1].YValues.IndexOf(d) > -1)
       System.Diagnostics.Debug.WriteLine(tChart1[1].Title);
    }
And the screenvideo:

https://www.screencast.com/t/Q2iGMydHquil

I have modified the issue on our tracker accordingly.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply