Page 1 of 1

Left Axis Labels

Posted: Mon Jul 26, 2004 8:44 am
by 9082888
Hi,

I have been trying to format the label of the left axis, i.e. from 25,000,000 to 25M, 3500 to 3.5K. My goal is to maximize the space in the chart. I am able to do this through the OnGetAxisLabel event. However, after the labels are formatted, the width of the label does not change which defies the purpose of doing so.
Isn't the label width supposed to change according to the width of the maximum width of the new labels?

Thanks,

Nina

Posted: Mon Jul 26, 2004 9:22 am
by Pep
Hi Nina,

to change the width automatically depending on the widh of the labels you can use :

Code: Select all

Private Sub TChart1_OnSeriesBeforeAdd(ByVal SeriesIndex As Long, MoreValues As Boolean)
  TChart1.Axis.Left.Labels.Size = TChart1.Axis.Left.Labels.Width(TChart1.Axis.Left.Maximum)
End Sub

Posted: Mon Jul 26, 2004 9:31 am
by 9082888
Hi,

Thanks for the prompt reply.

Nina