To set margin of scroll Pager chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
amol
Advanced
Posts: 231
Joined: Tue Mar 29, 2005 5:00 am

To set margin of scroll Pager chart

Post by amol » Tue Sep 29, 2015 11:12 am

Hi steema

We are using scrollpager tool but we are unable to set margin of the chart.
we are using
tchart.Panel.MarginLeft=20;
tchart.Panel.MarginBottom=20;
tchart.Panel.MarginRight=20;
tchart.Panel.Margin.Top=20;
we are attaching demo for the same.

Thanks in advance.
ScrollPagerDemo.rar
ScrollPagerDemo
(60.54 KiB) Downloaded 925 times
Thanks

amol
Advanced
Posts: 231
Joined: Tue Mar 29, 2005 5:00 am

Re: To set margin of scroll Pager chart

Post by amol » Wed Sep 30, 2015 5:16 am

Hi Steema Support ,

We also want to set margin between these two curves.As shown in image below.
set margin.png
Set margin
set margin.png (79.13 KiB) Viewed 7658 times
Thanks in advance.

Thanks,

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: To set margin of scroll Pager chart

Post by Christopher » Wed Sep 30, 2015 8:13 am

Hello!

You can try e.g.

Code: Select all

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

      tChart1.GetAxesChartRect += TChart1_GetAxesChartRect;

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

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

      point.Change += new EventHandler(point_Change);
      this.SizeChanged += new System.EventHandler(this.Tools_ScrollPager_SizeChanged);

      annotate.Position = AnnotationPositions.LeftTop;
      annotate.Text = "Y-Axis Value:";
      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;
    }

    private void TChart1_GetAxesChartRect(object sender, Steema.TeeChart.GetAxesChartRectEventArgs e)
    {
      Rectangle rect = e.AxesChartRect;
      e.AxesChartRect = Utils.FromLTRB(rect.Left + 100, rect.Top, rect.Right - 100, rect.Bottom - 200);
    }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply