Grid not displaying as desired - x axis questions

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Iceman
Newbie
Newbie
Posts: 6
Joined: Thu Sep 04, 2003 4:00 am

Grid not displaying as desired - x axis questions

Post by Iceman » Fri Nov 12, 2010 8:40 pm

I tried working with earlier advice to other user where I assign the max and min values for the yleft and yright but instead of a value pumped into my spin edit control, it looks like maybe a pixel value? How do I put in the max value. For instance, in the left axis, the min is 0 and the max is 10. The right axis min is 0 and the max is getting close to 40

Also, in the graph, the horizontal grid repeats values. Can I fix this to one entry along the y axis with a single grid line at 1,2,3,4...10?

Thanks, Sean

Below code assigns what I think is max value but maybe max pixel to a group of spin edit controls...

LYAxisMax.Value := dbChart1.LeftAxis.Maximum;
LYAxisMin.Value := dbChart1.LeftAxis.Minimum;
RYAxisMax.Value := dbChart1.RightAxis.Maximum;
RYAxisMin.Value := dbChart1.RightAxis.Minimum;
Attachments
SampleGraph.jpg
SampleGraph.jpg (97.18 KiB) Viewed 3696 times

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Grid not displaying as desired - x axis questions

Post by Yeray » Tue Nov 16, 2010 9:43 am

Hi Sean,

You'll probably have a series assigned to the Left Axis and the other series assigned to the Right Axis. If you want both Left and Right axes to be identical, you could set both series to use both Left and Right axis:

Code: Select all

Series1.VertAxis:=aBothVertAxis;
Series2.VertAxis:=aBothVertAxis;
What I'm not sure is how you managed to have repeated values in the Left Axis. It would be helpful if you could send us a simple example project we can run as-is to reproduce the problem here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Iceman
Newbie
Newbie
Posts: 6
Joined: Thu Sep 04, 2003 4:00 am

Re: Grid not displaying as desired - x axis questions

Post by Iceman » Tue Nov 16, 2010 2:05 pm

Hi, yes I use a series of Y values for the left axis and a different series of Y values for the right axis. In the chart above, it is 10ths of concentration of ice on the left and thickness of the ice on the right. I can't lock the scales as I allow users the option to select any series they want to plot.

Perhaps I really need a solid tutorial on how to put this all together. Currently I use code and I also modify the series by dbl-clicking on dbChart1 and editing. I need simple more than complex so I am sure I have just got too many things going on that aren't needed. Primarily, on the left axis, I just want one '10', not two or more on the Y scale bar. Thanks, Sean

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Grid not displaying as desired - x axis questions

Post by Yeray » Tue Nov 16, 2010 2:57 pm

Hi Sean,

By default, the left axis shouldn't show repeated values. It has to be something with the properties you've set. Check the Increment and the labels format.
It would be easier if you could send us a simple example project we can run as-is to reproduce the situation here. So we could investigate where can be the conflict/confusion.

There is a tutorial talking about axis: Tutorial 4 - Axis Control.
You should find tutorials, help files and examples at TeeChart program's group, through the Start Menu.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Iceman
Newbie
Newbie
Posts: 6
Joined: Thu Sep 04, 2003 4:00 am

Re: Grid not displaying as desired - x axis questions

Post by Iceman » Tue Nov 16, 2010 7:42 pm

Thanks Yeray, it is all working much better now. You were right. iIt was the labels and the increment value which were causing me issues. Thanks again, Sean

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Grid not displaying as desired - x axis questions

Post by Yeray » Wed Nov 17, 2010 10:36 am

Hi Sean,

You are welcome! I'm glad to hear you're satisfied with it!
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply