Class SparkHorizontalAxis (Excel VBA)

The class SparkHorizontalAxis represents the settings for the horizontal axes of a group of sparklines.


To use a SparkHorizontalAxis class variable it first needs to be instantiated, for example

Dim shas as SparkHorizontalAxis
Set shas = ActiveCell.SparklineGroups(1).Axes.Horizontal

SparkHorizontalAxis class variables can be set using the SparkAxes.Horizontal procedure.


Returns a SparkColor object that specifies the color of the horizontal axis of the sparkline.

Dim scrAxis As SparkColor
Set scrAxis = ActiveCell.SparklineGroups(1).Axes.Horizontal.Axis


Returns whether the horizontal axis of the sparkline is based on date values.

True if the horizontal axis is based on date values; otherwise, False.

Dim booIsDateAxis As Boolean
booIsDateAxis = ActiveCell.SparklineGroups(1).Axes.Horizontal.IsDateAxis


Returns or sets whether the points on the horizontal axis are plotted in right-to-left order.

Set the RightToLeftPlotOrder property to True to plot the values on the horizontal axis in right-to-left order.

ActiveCell.SparklineGroups(1).Axes.Horizontal.RightToLeftPlotOrder = True