(TChartAXPro V7)
In TChart Editor, Axis->Label->Format->ValueFormat->Percent does not work(Always Thousands if set to percent).How can I use this dialog ?
I wish to set left axis scale to actual min,max and percent(0-100) alternatively.
What property/method should be used and how to coding for it.
Please show me a small sample code.
Thanks in advance. Best Regards.
Left Axis scalling change
Hi,
ie : From #,##0.### to #,##0.### %
You must add (or change the format) directly in the ValueFormat field.In TChart Editor, Axis->Label->Format->ValueFormat->Percent does not work(Always Thousands if set to percent).How can I use this dialog ?
ie : From #,##0.### to #,##0.### %
You must do this manually, by "reformatting" axis labels after they are added to chart series. You can use the OnGetAxisLabel event to transform "normal" values to percent values. Something like this :I wish to set left axis scale to actual min,max and percent(0-100) alternatively.
What property/method should be used and how to coding for it.
Please show me a small sample code.
Code: Select all
Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
If Axis = TChart1.Axis.Left Then
' 1. convert string in LabelText to double value
' 2. perform transformation on double value. In your case transform
' in to percentage
' 3. convert transformed value back to string and assign it to LabelText
End If
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com