Command
New-ChartDataLabel
Configures DataLabels for Charts
Syntax
New-ChartDataLabel [-Distributed] [-Enabled] [[-FontColor] <String[]>] [[-FontFamily] <String>] [[-FontSize] <Object>] [[-OffsetX] <Nullable`1>] [[-OffsetY] <Nullable`1>] [[-TextAnchor] <start|middle|end>] [<CommonParameters>]#Parameter set:
All Parameter SetsExamples
EXAMPLE 1
An exampleParameters
- -Distributed SwitchParameter
- Similar to plotOptions.bar.distributed, this option makes each data-label discrete. So, when you provide an array of colors in datalabels.style.colors, the index in the colors array correlates with individual data-label index of all series.
- -Enabled SwitchParameter
- To determine whether to show dataLabels or not
- -FontColor String[]
- FontColors for the dataLabels. Accepts an array of string colors. Each index in the array corresponds to the series
- -FontFamily String
- FontFamily for the label
- -FontSize Object
- FontSize for the label
- -OffsetX Nullable`1
- Sets the left offset for dataLabels
- -OffsetY Nullable`1
- Sets the top offset for dataLabels
- -TextAnchor String
- The alignment of text relative to dataLabel’s drawing position. Accepted values: start, middle, end
- Possible values:
start,middle,end
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.