I'm trying to set the position of the Axis Label with respect to the axis.
If I have the Axis scaled for 0 to 1000 and marks every 100, then the spacing between the label and the values is too great.
We want to reduce the spacing to something less.
How can I accomplish this?
Thanks!
Set Position of Axis Lable
Re: Set Position of Axis Lable
Hi Tirby,
This is how it looks for me here:
What space do you want to reduce?
I'm not sure to understand what exact distance do you mean.tirby wrote:the spacing between the label and the values is too great.
We want to reduce the spacing to something less.
This is how it looks for me here:
Code: Select all
Private Sub Form_Load()
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues
TChart1.Axis.Left.SetMinMax 0, 1000
TChart1.Axis.Left.Increment = 100
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Set Position of Axis Lable
Yeray,
Thanks for looking at this.
What I'm trying to do is change the spacing between the the 2 black arrows as shown on the picture below.
Thanks for looking at this.
What I'm trying to do is change the spacing between the the 2 black arrows as shown on the picture below.
- Attachments
-
- Spacing.png (17 KiB) Viewed 11426 times
Re: Set Position of Axis Lable
Hello,
I'm afraid you can't control the axis title position.
Instead, you could hide the axis title and draw its text manually as follows:
I'm afraid you can't control the axis title position.
Instead, you could hide the axis title and draw its text manually as follows:
Code: Select all
Private Sub TChart1_OnAfterDraw()
With TChart1.Axis.Left
XPos = .Position - .Labels.MaxWidth - .TickLength
YPos = .IStartPos + ((.IEndPos - .IStartPos) / 2) + (TChart1.Canvas.TextWidth(.Title.Caption) / 2)
End With
With TChart1.Canvas
.RotateLabel XPos, YPos, TChart1.Axis.Left.Title.Caption, 90
End With
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |