New-ChartAxisY
Creates a new Y-axis for a chart with customizable parameters.
Syntax
New-ChartAxisY
[-Floating]
[-ForceNiceScale]
[[-LabelAlign] <left| center| right>]
[[-LabelFontColor] <String[]>]
[[-LabelFontFamily] <String>]
[[-LabelFontSize] <Object>]
[[-LabelFontWeight] <String>]
[[-LabelMaxWidth] <Int32>]
[[-LabelMinWidth] <Int32>]
[-Logarithmic]
[[-MaxValue] <Int32>]
[[-MinValue] <Int32>]
[-Opposite]
[-Reversed]
[[-SeriesName] <String>]
[-Show]
[-ShowAlways]
[[-TitleColor] <String>]
[[-TitleFontFamily] <String>]
[[-TitleFontSize] <Int32>]
[[-TitleFontWeight] <String>]
[[-TitleOffsetX] <Int32>]
[[-TitleOffsetY] <Int32>]
[[-TitleRotate] <90| 270>]
[[-TitleText] <String>]
[<CommonParameters>]#All Parameter SetsDescription
This function creates a new Y-axis for a chart with the provided parameters. It allows customization of the axis visibility, title, labels, range, style, and other options.
Examples
Example 1
New-ChartAxisY -Show -TitleText 'Sales' -MinValue 0 -MaxValue 1000 -LabelAlign 'center'Creates a new Y-axis with the title 'Sales', range from 0 to 1000, and center-aligned labels.
Example 2
New-ChartAxisY -Show -ShowAlways -TitleText 'Temperature' -TitleColor 'red' -LabelAlign 'right'Creates a new Y-axis with the title 'Temperature', always visible, red-colored title, and right-aligned labels.
Parameters
- -Floating SwitchParameter
- Indicates whether the Y-axis should be floating.
- -ForceNiceScale SwitchParameter
- Indicates whether the Y-axis should have a nice scale.
- -LabelAlign String
- The alignment of the Y-axis labels. Accepted values are 'left', 'center', or 'right'.
- Possible values:
left,center,right - -LabelFontColor String[]
- The color of the Y-axis labels.
- -LabelFontFamily String
- The font family of the Y-axis labels.
- -LabelFontSize Object
- The font size of the Y-axis labels.
- -LabelFontWeight String
- The font weight of the Y-axis labels.
- Possible values:
normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900 - -LabelMaxWidth Int32
- The maximum width of the Y-axis labels.
- -LabelMinWidth Int32
- The minimum width of the Y-axis labels.
- -Logarithmic SwitchParameter
- Indicates whether the Y-axis should have a logarithmic scale.
- -MaxValue Int32
- The maximum value of the Y-axis.
- -MinValue Int32
- The minimum value of the Y-axis.
- -Opposite SwitchParameter
- Indicates whether the Y-axis should be positioned on the opposite side.
- -Reversed SwitchParameter
- Indicates whether the Y-axis should be reversed.
- -SeriesName String
- The name of the series associated with the Y-axis.
- -Show SwitchParameter
- Indicates whether the Y-axis should be displayed.
- -ShowAlways SwitchParameter
- Indicates whether the Y-axis should always be visible.
- -TitleColor String
- The color of the Y-axis title.
- -TitleFontFamily String
- The font family of the Y-axis title.
- -TitleFontSize Int32
- The font size of the Y-axis title.
- -TitleFontWeight String
- The font weight of the Y-axis title.
- Possible values:
normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900 - -TitleOffsetX Int32
- The horizontal offset of the Y-axis title.
- -TitleOffsetY Int32
- The vertical offset of the Y-axis title.
- -TitleRotate String
- The rotation angle of the Y-axis title. Accepted values are '90' or '270'.
- Possible values:
90,270 - -TitleText String
- The text to be displayed as the title of the Y-axis.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.