public Polyline NormalizedValues(Polyline pl) { Polyline result = new Polyline(); for (int i = 0; i < pl.Points.Count; i++) { Point pt = pl.Points[i]; Point npt = NormalizedValue(pt); result.Points.Add(npt); } return result; } public Point NormalizedValue(Point pt) { Point npt = new Point(); npt.X = (pt.X - _ca.xMin) * chartCanvas.Width / (_ca.xMax - _ca.xMin); npt.Y = chartCanvas.Height - (pt.Y - _ca.yMin) * chartCanvas.Height / (_ca.yMax - _ca.yMin); return npt; } public void Draw() { // Clean the chart area. chartCanvas.Children.Clear(); foreach (Trace tr in _Traces) { Polyline Normalized = NormalizedValues(tr.Values); Normalized.Stroke = tr.Color; chartCanvas.Children.Add(Normalized); } }