This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Represents the data label of a chart point.
auto | Specifies if the data label automatically generates appropriate text based on context. |
context | The request context associated with the object. This connects the add-in's process to the Office host application's process. |
format | Represents the format of chart data label. |
formula | String value that represents the formula of chart data label using A1-style notation. |
geometric | Specifies the geometric shape type of the data label. See |
height | Returns the height, in points, of the chart data label. Value is |
horizontal | Represents the horizontal alignment for chart data label. See |
left | Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Value is |
link | Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells). |
number | Specifies the format code for data label. |
position | Value that represents the position of the data label. See |
separator | String representing the separator used for the data label on a chart. |
show | Specifies if the data label is shown as a callout with the tail anchor attached to the data point. If |
show | Specifies if the data label bubble size is visible. |
show | Specifies if the data label category name is visible. |
show | Specifies if the data label legend key is visible. |
show | Specifies if the data label percentage is visible. |
show | Specifies if the data label series name is visible. |
show | Specifies if the data label value is visible. |
text | String representing the text of the data label on a chart. |
text | Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text. |
top | Represents the distance, in points, from the top edge of chart data label to the top of chart area. Value is |
vertical | Represents the vertical alignment of chart data label. See |
width | Returns the width, in points, of the chart data label. Value is |
get | Returns a substring of the data label. The line break character '\n' counts as one character. |
get | Returns the tail anchor of the data label which is shown as a sticky callout. |
load(options) | Queues up a command to load the specified properties of the object. You must call |
load(property | Queues up a command to load the specified properties of the object. You must call |
load(property | Queues up a command to load the specified properties of the object. You must call |
set(properties, options) | Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. |
set(properties) | Sets multiple properties on the object at the same time, based on an existing loaded object. |
set | Sets the height of the data label in points. |
set | Sets the width of the data label in points. |
toJSON() | Overrides the JavaScript |
Specifies if the data label automatically generates appropriate text based on context.
autoText: boolean;
boolean
The request context associated with the object. This connects the add-in's process to the Office host application's process.
context: RequestContext;
Represents the format of chart data label.
readonly format: Excel.ChartDataLabelFormat;
String value that represents the formula of chart data label using A1-style notation.
formula: string;
string
Specifies the geometric shape type of the data label. SeeExcel.GeometricShapeType
for more details. Value isnull
if the data label is not a geometric shape.
geometricShapeType: Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus";
Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"
Returns the height, in points, of the chart data label. Value isnull
if the chart data label is not visible.
readonly height: number;
number
Represents the horizontal alignment for chart data label. SeeExcel.ChartTextHorizontalAlignment
for details. This property is valid only whenTextOrientation
of data label is -90, 90, or 180.
horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed";
Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"
Represents the distance, in points, from the left edge of chart data label to the left edge of chart area. Value isnull
if the chart data label is not visible.
left: number;
number
Specifies if the number format is linked to the cells (so that the number format changes in the labels when it changes in the cells).
linkNumberFormat: boolean;
boolean
Specifies the format code for data label.
numberFormat: string;
string
Value that represents the position of the data label. SeeExcel.ChartDataLabelPosition
for details.
position: Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout";
Excel.ChartDataLabelPosition | "Invalid" | "None" | "Center" | "InsideEnd" | "InsideBase" | "OutsideEnd" | "Left" | "Right" | "Top" | "Bottom" | "BestFit" | "Callout"
String representing the separator used for the data label on a chart.
separator: string;
string
Specifies if the data label is shown as a callout with the tail anchor attached to the data point. Iftrue
, the callout is one of the following values: "AccentCallout1", "AccentCallout2", "BorderCallout1", "BorderCallout2", "WedgeRectCallout", "WedgeRRectCallout" or "WedgeEllipseCallout". SeeGeometricShapeType for more details.
readonly showAsStickyCallout: boolean;
boolean
Specifies if the data label bubble size is visible.
showBubbleSize: boolean;
boolean
Specifies if the data label category name is visible.
showCategoryName: boolean;
boolean
Specifies if the data label legend key is visible.
showLegendKey: boolean;
boolean
Specifies if the data label percentage is visible.
showPercentage: boolean;
boolean
Specifies if the data label series name is visible.
showSeriesName: boolean;
boolean
Specifies if the data label value is visible.
showValue: boolean;
boolean
String representing the text of the data label on a chart.
text: string;
string
Represents the angle to which the text is oriented for the chart data label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.
textOrientation: number;
number
Represents the distance, in points, from the top edge of chart data label to the top of chart area. Value isnull
if the chart data label is not visible.
top: number;
number
Represents the vertical alignment of chart data label. SeeExcel.ChartTextVerticalAlignment
for details. This property is valid only whenTextOrientation
of data label is 0.
verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed";
Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"
Returns the width, in points, of the chart data label. Value isnull
if the chart data label is not visible.
readonly width: number;
number
Returns a substring of the data label. The line break character '\n' counts as one character.
getSubstring(start: number, length?: number): Excel.ChartFormatString;
number
The zero-based starting character position of a substring in the data label.
number
Optional. The number of characters in the substring. If length is omitted, all the characters from start to the end of the data label are retrieved.
Returns the tail anchor of the data label which is shown as a sticky callout.
getTailAnchor(): Excel.ChartDataLabelAnchor;
Queues up a command to load the specified properties of the object. You must callcontext.sync()
before reading the properties.
load(options?: Excel.Interfaces.ChartDataLabelLoadOptions): Excel.ChartDataLabel;
Provides options for which properties of the object to load.
Queues up a command to load the specified properties of the object. You must callcontext.sync()
before reading the properties.
load(propertyNames?: string | string[]): Excel.ChartDataLabel;
string | string[]
A comma-delimited string or an array of strings that specify the properties to load.
Queues up a command to load the specified properties of the object. You must callcontext.sync()
before reading the properties.
load(propertyNamesAndPaths?: { select?: string; expand?: string; }): Excel.ChartDataLabel;
{select?: string;expand?: string;}
propertyNamesAndPaths.select
is a comma-delimited string that specifies the properties to load, andpropertyNamesAndPaths.expand
is a comma-delimited string that specifies the navigation properties to load.
Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type.
set(properties: Interfaces.ChartDataLabelUpdateData, options?: OfficeExtension.UpdateOptions): void;
A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called.
Provides an option to suppress errors if the properties object tries to set any read-only properties.
void
Sets multiple properties on the object at the same time, based on an existing loaded object.
set(properties: Excel.ChartDataLabel): void;
void
Sets the height of the data label in points.
setHeight(height: number): void;
number
The height of the data label in points.
void
Sets the width of the data label in points.
setWidth(width: number): void;
number
The width of the data label in points.
void
Overrides the JavaScripttoJSON()
method in order to provide more useful output when an API object is passed toJSON.stringify()
. (JSON.stringify
, in turn, calls thetoJSON
method of the object that's passed to it.) Whereas the originalExcel.ChartDataLabel
object is an API object, thetoJSON
method returns a plain JavaScript object (typed asExcel.Interfaces.ChartDataLabelData
) that contains shallow copies of any loaded child properties from the original object.
toJSON(): Excel.Interfaces.ChartDataLabelData;
Was this page helpful?
Was this page helpful?