Use this property to return/set values that determines the scale characteristics for a specific y-axis.  Recall that up to 10 y-axis scales can be configured.   This upper bound can be set through the NumYScales property.

YScale is an array from 1 to NumYScales and it uses the Scale Class set of properties for its characteristics.

NOTE: Up to 20 characters, across two rows, can be displayed on the chart for each label.  Example, "Speed" & Chr(13) & Chr(10) & "m/s", will display  "Speed" in the label's first row and "m/s" in the label's second row.  A carriage return - Chr(13) - and a linefeed - Chr(10) - are required to indicate the text spans two rows.



XYChartCtrl.NumProfiles = 10               'Sets the number of profiles to plot to 10
XYChartCtrl.NumYScales = 5                 'Sets the number of y-axis scales to 5

XYChartCtrl.YScale(1).Visible = TRUE       'Y-axis scale 1 will be displayed
XYChartCtrl.YScale(2).Visible = TRUE       'Y-axis scale 2 will be displayed
XYChartCtrl.YScale(3).Visible = FALSE      'Y-axis scale 3 will not be displayed
XYChartCtrl.YScale(4).Visible = TRUE       'Y-axis scale 4 will be displayed
XYChartCtrl.YScale(5).Visible = FALSE      'Y-axis scale 5 will not be displayed

XYChartCtrl.YScale(1).Label = "Volts"      'Sets the label for the first y-scale
XYChartCtrl.YScale(2).Label = "Ohms"       'Sets the label for the second y-scale
XYChartCtrl.YScale(3).Label = "Watts"      'Sets the label for the third y-scale
XYChartCtrl.YScale(4).Label = "Amps"       'Sets the label for the fourth y-scale
XYChartCtrl.YScale(5).Label = "GHz"        'Sets the label for the fifth y-scale

XYChartCtrl.YScale(1).Color = vbRed        'Sets the color for the first y-scale
XYChartCtrl.YScale(2).Color = vbGreen      'Sets the color for the second y-scale
XYChartCtrl.YScale(3).Color = vbBlue       'Sets the color for the third y-scale
XYChartCtrl.YScale(4).Color = vbYellow     'Sets the color for the fourth y-scale
XYChartCtrl.YScale(5).Color = vbBlack      'Sets the color for the fifth y-scale

XYChartCtrl.YScale(3).ScaleMode = smManual 'Set the scale mode to Manual for the third y-scale
XYChartCtrl.YScale(3).Min = -1             'Set the third y-scale's min value
XYChartCtrl.YScale(3).Max = 1              'Set the third y-scale's max value

XYChartCtrl.YScale(1).TickLabelSpacing = 0 'Set the tick label spacing as close as possible without YScale 1 tick labels overlapping
XYChartCtrl.XScale(1).TickLabelSpacing = 0 'Set the tick label spacing as close as possible without XScale 1 tick labels overlapping

XYChartCtrl.YScale(2).TickLabelSpacing = 2 'Set the tick label spacing to be a min. of twice the height of YScale 2 tick label font
XYChartCtrl.XScale(2).TickLabelSpacing = 2 'Set the tick label spacing to be a min. of twice the width of the max. tick label width 

                                           'based on XScale 2 tick label font

XYChartCtrl.Refresh                        'Refresh required to update chart with changes made


See Also

Properties    Y-Axes Property Page     Number Formatting     DateTime Formatting