private void InitializeChart()
        {
            tChart1.Header.Text       = "Scroll Pager Tool";
            tChart1.Series.Add(series = new FastLine());
            series.FillSampleValues(1000);
            tChart1.Tools.Add(tool     = new ScrollPager());
            tChart1.Tools.Add(point    = new NearestPoint());
            tChart1.Tools.Add(annotate = new Annotation());

            point.Brush.Color = tool.PointerHighlightColor;
            point.DrawLine    = false;
            point.Size        = 6;
            point.Direction   = NearestPointDirection.Horizontal;
            point.Series      = series;
            point.Change     += new EventHandler(point_Change);

            annotate.Position             = AnnotationPositions.RightTop;
            annotate.Text                 = "YValue:";
            annotate.Shape.Shadow.Visible = false;
            annotate.Shape.Font.Color     = tChart1.Header.Font.Color;
            annotate.Shape.Color          = tool.PointerHighlightColor;
            annotate.Shape.Pen.Visible    = false;
            annotate.TextAlign            = StringAlignment.Center;

            Theme.ApplyChartTheme(typeof(FlatTheme), tool.SubChartTChart.Chart);
        }
        public MainWindow()
        {
            InitializeComponent();

            series = new Steema.TeeChart.WPF.Styles.Line();
            tChart1.Series.Add(series);
            tChart1.Chart.Aspect.View3D = false;
            tChart1.Header.Visible      = false;
            tChart1.Legend.Visible      = false;

            series.FillSampleValues(500);

            black = new BlackIsBackTheme(tChart1.Chart);
            black.Apply();


            tool = new ScrollPager(tChart1.Chart);

            tool.Series = series;
            black       = new BlackIsBackTheme(tool.SubChartTChart.Chart);
            black.Apply();

            tool.SubChartTChart.Panel.Pen.Visible = false;
            tool.SubChartTChart.Panel.Bevel.Inner = BevelStyles.None;
            tool.SubChartTChart.Panel.Bevel.Outer = BevelStyles.None;
        }
        private void InitializeChart()
        {
            tChart1.Frame = this.View.Frame;

            tChart1.Header.Text       = "Scroll Pager Tool";
            tChart1.Panning.Active    = true;
            tChart1.Series.Add(series = new FastLine());
            series.FillSampleValues(1000);

            tChart1.Tools.Add(tool = new ScrollPager());

            for (int i = 0; i < tChart1.Series.Count; i++)
            {
                if (tChart1.Series[i].Count > 0)
                {
                    tool.Series = tChart1.Series[i];
                }
            }

            tool.ColorBandTool.StartLine.AllowDrag = true;
            tool.ColorBandTool.EndLine.AllowDrag   = true;
            tool.ColorBandTool.StartLine.Active    = true;
            tool.ColorBandTool.EndLine.Active      = true;


            tChart1.Tools.Add(colorlinetool = new ColorLine());
            colorlinetool.Value             = 100;
            colorlinetool.AllowDrag         = true;
            colorlinetool.Pen.Color         = Color.Blue;

            tChart1.ClickBackground += TChart1_ClickBackground;

            tChart1.Tools.Add(point    = new NearestPoint());
            tChart1.Tools.Add(annotate = new Annotation());

            point.Brush.Color = tool.PointerHighlightColor;
            point.DrawLine    = false;
            point.Size        = 6;
            point.Direction   = NearestPointDirection.Horizontal;
            point.Series      = series;
            point.Change     += Point_Change;

            annotate.Position             = AnnotationPositions.RightTop;
            annotate.Text                 = "YValue:";
            annotate.Shape.Shadow.Visible = false;
            annotate.Shape.Font.Color     = Color.Red;
            annotate.Shape.Color          = tool.PointerHighlightColor;
            annotate.Shape.Font.Size      = 15;
            annotate.Shape.Pen.Visible    = false;
            annotate.Shape.Transparent    = true;
            annotate.TextAlign            = CoreText.CTTextAlignment.Center;

            tChart1.Panel.Gradient.Visible = false;

            this.View.AddSubview(tChart1);
        }
Beispiel #4
0
        private void InitializeChart()
        {
            tChart1.Chart.Header.Text       = "Scroll Pager Tool";
            tChart1.Chart.Panning.Active    = true;
            tChart1.Chart.Series.Add(series = new FastLine());
            series.FillSampleValues(1000);

            tChart1.Chart.Tools.Add(tool = new ScrollPager());

            for (int i = 0; i < tChart1.Chart.Series.Count; i++)
            {
                if (tChart1.Chart.Series[i].Count > 0)
                {
                    tool.Series = tChart1.Chart.Series[i];
                }
            }

            tool.ColorBandTool.StartLine.AllowDrag = true;
            tool.ColorBandTool.EndLine.AllowDrag   = true;
            tool.ColorBandTool.StartLine.Active    = true;
            tool.ColorBandTool.EndLine.Active      = true;


            tChart1.Chart.Tools.Add(colorlinetool = new ColorLine());
            colorlinetool.Value     = 100;
            colorlinetool.AllowDrag = true;
            colorlinetool.Pen.Color = Color.Blue;

            tChart1.Chart.ClickBackground += TChart1_ClickBackground;

            tChart1.Chart.Tools.Add(point    = new NearestPoint());
            tChart1.Chart.Tools.Add(annotate = new Annotation());

            point.Brush.Color = tool.PointerHighlightColor;
            point.DrawLine    = false;
            point.Size        = 6;
            point.Direction   = NearestPointDirection.Horizontal;
            point.Series      = series;
            point.Change     += new EventHandler(point_Change);

            annotate.Position             = AnnotationPositions.RightTop;
            annotate.Text                 = "YValue:";
            annotate.Shape.Shadow.Visible = false;
            annotate.Shape.Font.Color     = tChart1.Chart.Header.Font.Color;
            annotate.Shape.Color          = tool.PointerHighlightColor;
            annotate.Shape.Pen.Visible    = false;
            annotate.Shape.Font.Color     = Color.White;
            annotate.TextAlign            = TextAlignment.Center;

            //Theme.ApplyChartTheme(typeof(FlatTheme), tool.SubChartTChart.Chart);
        }