WPF ScrollPager Not Working
Posted: Thu Oct 27, 2016 11:16 am
I am trying to add a scroll pager to a tchart like in the example code (but for WPF) and I get a very strange result
Before I add a scroll pager. After
Any ideas would be gratefully received!
Tom
Before I add a scroll pager. After
Code: Select all
Chart.Series.Clear();
Chart.Header.Text = "Plot";
Chart.Axes.Automatic = true;
Chart.Legend.TopLeftPos = 0;
Chart.Axes.Bottom.Labels.DateTimeFormat = "HH:mm:ss";
Chart.Axes.Bottom.Labels.LabelsAsLocalTime = true;
Chart.Legend.LegendStyle = Steema.TeeChart.WPF.LegendStyles.Series;
FastLine series = new FastLine();
Chart.Series.Add(series);
series.FillSampleValues(1000);
Chart.Tools.Add(_nearestPoint = new NearestPoint());
Chart.Tools.Add(_annotate = new Annotation());
_scrollPager = new ScrollPager();
_scrollPager.Series = series;
_nearestPoint.Series = series;
_nearestPoint.Brush.Color = _scrollPager.PointerHighlightColor;
_nearestPoint.DrawLine = false;
_nearestPoint.Size = 6;
_nearestPoint.Direction = NearestPointDirection.Horizontal;
_annotate.Position = AnnotationPositions.RightTop;
_annotate.Text = "YValue:";
_annotate.Shape.Shadow.Visible = false;
_annotate.Shape.Font.Color = Chart.Header.Font.Color;
_annotate.Shape.Color = _scrollPager.PointerHighlightColor;
_annotate.Shape.Pen.Visible = false;
_annotate.TextAlign = TextAlignment.Center;
Tom