Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2379 - In 3D, Bar Series Clicked method doesn't return accurately where bars overlap
Summary: In 3D, Bar Series Clicked method doesn't return accurately where bars overlap
Status: RESOLVED NOTABUG
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-16 07:43 EDT by christopher ireland
Modified: 2020-10-23 10:06 EDT (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
Gif of Bar issue (146.31 KB, image/gif)
2020-10-16 07:43 EDT, christopher ireland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christopher ireland 2020-10-16 07:43:42 EDT
Created attachment 949 [details]
Gif of Bar issue

Using the following code:

        private void InitializeChart(TChart chart)
        {
            void Chart_MouseMove(object sender, MouseEventArgs e)
            {
                for (var i = 0; i < chart.Series.Count; i++)
                {
                    var index = chart.Series[i].Clicked(e.Location);
                    if(index > -1)
                    {
                        chart.Header.Text = $"bar{i}, value:{index}";
                        break;
                    }
                }
            }

            chart.Aspect.View3D = true;
            chart.MouseMove += Chart_MouseMove;


            for (var i = 0; i < 4; i++)
            {
                chart.Series.Add(typeof(Bar)).FillSampleValues();
            }

            ((Bar)chart.Series[0]).MultiBar = MultiBars.Stacked;
        }

You can see that where the Bars overlap there is an issue as to whether the correct value is being returned.
Comment 1 christopher ireland 2020-10-23 10:06:25 EDT
Reversing the order of the enumeration, e.g.

for (var i = chart.Series.Count - 1; i >= 0; i--)

resolves this issue.