I have a strip chart, Similiar to the Permenant custom axis example, with the top being my left axis and the one below it being a custom axis.
The Y labels on the top axis go from 100 - 300
The Y labels on the custom axis go from 10,000 - 30,000
The left margin is not being adjusted to display all the digits in the custom axis.
Thanks
Custom Axis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi history,
You can try setting left margin like this:
You can try setting left margin like this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Steema.TeeChart.Styles.Line line2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Steema.TeeChart.Axis axis1 = new Steema.TeeChart.Axis(false, false, tChart1.Chart);
tChart1.Axes.Custom.Add(axis1);
line2.CustomVertAxis = axis1;
axis1.StartPosition = 50;
axis1.EndPosition = 100;
tChart1.Axes.Left.EndPosition = 50;
for (int i = 0; i < 10; i++)
{
line1.Add(i * 100);
line2.Add(i * 10000);
}
Bitmap bmp = tChart1.Bitmap;
tChart1.Panel.MarginUnits = Steema.TeeChart.PanelMarginUnits.Pixels;
tChart1.Panel.MarginLeft = Math.Max(line1.GetVertAxis.MaxLabelsWidth(), line2.GetVertAxis.MaxLabelsWidth());
}
Best Regards,
Narcís Calvet / 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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / 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 |