Hi,
I want to show a very small chart (size 400 x 300). When I add only one data point with a float value on the Y Axis, this float value gets trimmed on the left side.
From the moment that I add a second data point, the values are shown correctly.
Why is this value trimmed when I have only one data point?
I made a very small C# project to reproduce this issue.
This is what I did:
TChart chut;
chut.Aspect.View3D = false;
line = new Steema.TeeChart.Styles.Line(chut.Chart);
line.Add(1, 105487.648984894);
and the TChart is added with a maximum size set to 400 x 300.
You can see the result in the attached screenshot.
I can also send you the complete C# project if that could be helpful. But where do I put that zip file?
Kind regards,
Marijke.
Numbers on Y Axis get trimmed off
Numbers on Y Axis get trimmed off
- Attachments
-
- screenshot
- Capture.PNG (12.63 KiB) Viewed 4984 times
Re: Numbers on Y Axis get trimmed off
Hello Marijke,
I suggest you do something as next code to achieve your code works as you expect:
Can you tell us if previous code works as you want?
I hope will helps.
Thanks,
I suggest you do something as next code to achieve your code works as you expect:
Code: Select all
Steema.TeeChart.Styles.Line line;
private void InitializeChart()
{
this.Width = 500;
this.Height = 400;
tChart1.Height = 300;
tChart1.Width = 400;
tChart1.Aspect.View3D = false;
line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line.Add(1, 105487.648984894);
tChart1.Draw();
tChart1.Panel.MarginUnits = PanelMarginUnits.Pixels;
tChart1.Panel.MarginLeft = tChart1.Panel.MarginLeft + tChart1.Axes.Left.MaxLabelsWidth();
}
private void button1_Click(object sender, EventArgs e)
{
tChart1.ShowEditor();
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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: Numbers on Y Axis get trimmed off
Your solution solved my problem.
Thank you very much!
Marijke
Thank you very much!
Marijke