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 - ClickSeries and ClickPointer events not being fired with Points series
Summary: ClickSeries and ClickPointer events not being fired with Points series
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Android (show other bugs)
Version: TeeChart.NET 2014 4.1.2014.02060
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-27 06:51 EDT by narcís calvet
Modified: 2014-06-27 10:27 EDT (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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