Page 1 of 1
To set margin of scroll Pager chart
Posted: Tue Sep 29, 2015 11:12 am
by 9526439
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.
Thanks
Re: To set margin of scroll Pager chart
Posted: Wed Sep 30, 2015 5:16 am
by 9526439
Hi Steema Support ,
We also want to set margin between these two curves.As shown in image below.
- Set margin
- set margin.png (79.13 KiB) Viewed 7663 times
Thanks in advance.
Thanks,
Re: To set margin of scroll Pager chart
Posted: Wed Sep 30, 2015 8:13 am
by Christopher
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);
}