I would like acheive what is shown in the below link.
http://www.teechart.net/support/viewtop ... 647#p44663
Right now, I have two fastlines. One for magnitude and an another for phase, plotted on a chart but I don't know how to give axes for magnitude and phase separately.
Any help is appreciated.
Magnitude and Phase plots
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Magnitude and Phase plots
Hello!
There are two methods - either set one of the series to the right axis, or use a custom axis - both of these are shown in the code below:
There are two methods - either set one of the series to the right axis, or use a custom axis - both of these are shown in the code below:
Code: Select all
FastLine series1 = new FastLine();
FastLine series2 = new FastLine();
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(series1);
tChart1.Series.Add(series2);
series1.FillSampleValues();
series2.FillSampleValues();
//method 1 - set one series to right axis
//series2.VertAxis = VerticalAxis.Right;
//method 2 - use a custom axis
Axis axis = new Axis(tChart1.Chart);
tChart1.Axes.Custom.Add(axis);
axis.Horizontal = false;
series2.CustomVertAxis = axis;
axis.StartPosition = 51;
axis.EndPosition = 100;
tChart1.Axes.Left.StartPosition = 0;
tChart1.Axes.Left.EndPosition = 49;
}
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 |
Re: Magnitude and Phase plots
Thank you very much indeed.
I'm working with custom axis for bottom, right and left and they work really well except with the margins and axis title.
Attached the screen-shot of the same. May I Know how to give nice margins and axis title with custom axis?
I'm working with custom axis for bottom, right and left and they work really well except with the margins and axis title.
Attached the screen-shot of the same. May I Know how to give nice margins and axis title with custom axis?
- Attachments
-
- CustomAxis.png (64.99 KiB) Viewed 7172 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Magnitude and Phase plots
Of course. You can use the Labels.CustomSize and the Panel.MarginLeft, as shown below:Raavi wrote:Attached the screen-shot of the same. May I Know how to give nice margins and axis title with custom axis?
Code: Select all
FastLine series1 = new FastLine();
Axis axis = new Axis();
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(series1);
series1.FillSampleValues();
tChart1.Axes.Custom.Add(axis);
axis.Horizontal = false;
series1.CustomVertAxis = axis;
axis.StartPosition = 0;
axis.EndPosition = 100;
axis.Title.Text = "Custom Axis Title";
axis.Title.Angle = 90;
axis.Labels.CustomSize = 50;
tChart1.Panel.MarginUnits = PanelMarginUnits.Pixels;
tChart1.Panel.MarginLeft = 80;
}
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 |