Hi,
I'd like to plot a gear with teeth and some circle, as show in the Figure 1 below. I am using TChart ActiveX control in MFD dialog. What I got does not have the right aspect ratio, i.e. the circle looks like an ellipse.
1. I tried making the chart width and height the same, but still the scales of x axis and y axis are not exactly the same. How can I make the scale of x and y the same?
2. The legend can be put at the bottom which will make it looks better, but still the legend will affect the scale of x and y axis. Is there a way to avoid that?
3.In the case that the X range (Xmin~Xmax) and Y range (Ymin~Ymax) are not the same, for example only plot several teeth, the tooth shape will be distorted as shown in Figure 2. So how to fix it?
4. When I change the dialog size, I want the size of TChart control changed accordingly/automatically. Is there a way to do that?
Thanks
JW
How to make x and y axis the same scale
How to make x and y axis the same scale
- Attachments
-
- Figure1.JPG (107.07 KiB) Viewed 4787 times
-
- Figure2.JPG (104.17 KiB) Viewed 4778 times
Re: How to make x and y axis the same scale
Hello John,
Thanks,
You can use property of Axes SetMinMax as do in below lines of code:1. I tried making the chart width and height the same, but still the scales of x axis and y axis are not exactly the same. How can I make the scale of x and y the same?
Code: Select all
TChart1.Axis.Bottom.SetMinMax 0, 50
TChart1.Axis.Left.SetMinMax 0, 50
Sorry but I don't understand well what do you achieve with legend. Could you please, explain exactly what do you want do with legend, step to step?2. The legend can be put
at the bottom which will make it looks better, but still the legend will affect the scale of x and y axis. Is there a way to avoid that?
I think that a good option for your is use Anti-Alaising tool. You can find an example in TeeChartActiveX Demo Project concretely All Features\Tools\Antialias Filter3.In the case that the X range (Xmin~Xmax) and Y range (Ymin~Ymax) are not the same, for example only plot several teeth, the tooth shape will be distorted as shown in Figure 2. So how to fix it?
You can use OnResize event of Chart to change automatically the size of Chart4. When I change the dialog size, I want the size of TChart control changed accordingly/automatically. Is there a way to do that?
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 |