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 1633

Summary: Tower series Clicked returns wrong value when side of 3D Bar clicked
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Red point indicates click

Description christopher ireland 2016-09-19 04:26:20 EDT
Created attachment 644 [details]
Red point indicates click

Using the following code:

    Random random = new Random();
    Tower series;
    private void InitializeChart()
    {
      series = new Tower(tChart1.Chart);

      series.UseColorRange = false;
      series.UsePalette = true;

      for (int i = 0; i < 2; i++)
      {
        for (int j = 0; j < 2; j++)
        {
          series.Add(i, random.Next(100), j);
        }
      }

      tChart1.MouseClick += TChart1_MouseClick;
    }

    private void TChart1_MouseClick(object sender, MouseEventArgs e)
    {
      int index = series.Clicked(e.X, e.Y);
      if (index > -1)
        tChart1.Header.Text = "Index: " + index.ToString() + " " + "YValue: " + series.YValues[index].ToString();
    }

and clicking on the red point in the attached image returns an erroneous index number, the index number of bar behind.