Hi !
I just bought TeeChart Pro and have a little question regarding the Y-axis.
Have a look at this picture:
As you can see the the green axis overwrites the blue one. Is there a possibility to autoadjust custom axis? Or did you have a piece of code to do it manually?
Autoadjust of width for y axis?
Autoadjust of width for y axis?
Greetz Dominik
http://www.logview.info
http://www.logview.info
Hi moelski,
you should try setting different values for the following properties:
Also by design-time you can adjust them to your wishes.
And for further information you can take a look at the tutorials:
"Tutorial 2 - Chart display properties" (Margins).
"Tutorial 4 - Axis Control" (Axis position).
you should try setting different values for the following properties:
Code: Select all
Chart1.CustomAxes.Items[0].PositionUnits:=muPercent;
Chart1.CustomAxes.Items[0].PositionPercent:=-10;
Chart1.MarginLeft:=10;
And for further information you can take a look at the tutorials:
"Tutorial 2 - Chart display properties" (Margins).
"Tutorial 4 - Axis Control" (Axis position).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Hi Yeray,
well that won´t solve my problem...
If you resize the chart size the axis change their distance percental to the width of the chart. That´s not what we want.
The distance between chart and axis should be the same if you resize the chart. This can be done if you use position in pixel and not in %.
The problem is when the Axis values get bigger. Then thy will override the other axis. (See picture). This is what we wanna change. If the axis values are to big, the axis position should be recalculated.
well that won´t solve my problem...
This results in the following ...Chart1.CustomAxes.Items[0].PositionUnits:=muPercent;
Chart1.CustomAxes.Items[0].PositionPercent:=-10;
Chart1.MarginLeft:=10;
If you resize the chart size the axis change their distance percental to the width of the chart. That´s not what we want.
The distance between chart and axis should be the same if you resize the chart. This can be done if you use position in pixel and not in %.
The problem is when the Axis values get bigger. Then thy will override the other axis. (See picture). This is what we wanna change. If the axis values are to big, the axis position should be recalculated.
Greetz Dominik
http://www.logview.info
http://www.logview.info
Hi moelski,
I've sent you a project to show you how to solve your request. You have to calculate your custom (and left) axes positions using basically those functions:
So you will be able to do, for example:
I've sent you a project to show you how to solve your request. You have to calculate your custom (and left) axes positions using basically those functions:
Code: Select all
Chart1.CustomAxes.Items[0].PositionUnits := muPixels; // to count position in pixels
Chart1.CustomAxes.Items[0].PositionPercent := 0; // to place your custom at chart beginning (for example)
Chart1.CustomAxes.Items[0].MaxLabelsWidth // your custom axis labels width in pixels
Chart1.CustomAxes.Items[0].TickLength // your custom axis tick lenght in pixels
Code: Select all
Chart1.CustomAxes.Items[0].PositionPercent := - Chart1.Axes.Left.MaxLabelsWidth - Chart1.Axes.Left.TickLength - 10;
Chart1.MarginLeft := 7;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |