Profile Picture

Coordinate transformations in WPF app

Posted By Vladimir Zverev 5 Years Ago
Author
Message
Vladimir Zverev
Question Posted 5 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 3, Visits: 16
Hello!
I use Nevron Chart for WPF. How I can transform mouse coordinates to chart axis coordinates?
This code is incorrect, because WPF ChartControl does not contain View method


private void _chartControl_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
      System.Windows.Point point = e.GetPosition(_chartControl);
      NCartesianChart chart = (NCartesianChart)(_chartControl.Charts[0]);
      NViewToScale2DTransformation transf = new NViewToScale2DTransformation(_chartControl.View.Context, chart, (int)StandardAxis.PrimaryX, (int)StandardAxis.PrimaryY);
      NVector2DD pointScale = default(NVector2DD);
      transf.Transform(new NPointF((float)point.X, (float)point.Y), ref pointScale);
 }

Thanks




Similar Topics


Reading This Topic