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 819

Summary: ClickSeries and ClickPointer events not being fired with Points series
Product: .NET TeeChart Reporter: narcís calvet <narcis>
Component: AndroidAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: major CC: narcis
Priority: High    
Version: TeeChart.NET 2014 4.1.2014.02060   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=4&t=15019
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description narcís calvet 2014-06-27 06:51:06 EDT
While ClickSeries is fired with Area and Bar, it's not being fired with Line, FastLine and Points series. Therefore, ClickPointer event isn't fired either.

A workaround is using the Touch event, for example:

    void tChart1_Touch(object sender, View.TouchEventArgs e)
    {
      for (int i = 0; i < tChart1.Series.Count; i++)
      {
        if (tChart1[i] is Steema.TeeChart.Styles.CustomPoint)
        {
          int x = Steema.TeeChart.Utils.Round(e.Event.GetX());
          int y = Steema.TeeChart.Utils.Round(e.Event.GetY());

          Steema.TeeChart.Styles.CustomPoint p = (Steema.TeeChart.Styles.CustomPoint)tChart1[i];
          int index = p.Clicked(x, y);

          if (index != -1)
          {
            this.Points_ClickPointer(p, index, x, y);
            break;
          }
        }
      }
    }

    void Points_ClickPointer(CustomPoint series, int valueIndex, int x, int y)
    {
      new AlertDialog.Builder(this)
      .SetTitle("Alert1")
      .SetMessage("ValueIndex is: " + valueIndex.ToString())
      .SetPositiveButton("OK", null as IDialogInterfaceOnClickListener)
      .Show();
    }
Comment 1 narcís calvet 2014-06-27 10:27:25 EDT
DoMouseDown was using "raw" (http://developer.android.com/reference/android/view/MotionEvent.html#getRawX()) coordinates instead of view relative coordinates