Excel.ChartDataLabel class

グラフ上のポイントのデータ ラベルを表します。

Extends

注釈

API セット: ExcelApi 1.7

使用元

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-data-labels.yaml

// This function styles substrings within data label text using font formatting.
await Excel.run(async (context) => {
  const sheet = context.workbook.worksheets.getItem(sheetName);
  const chart = sheet.charts.getItemAt(0);
  await context.sync();

  const series = chart.series.getItemAt(0);
  series.load("points");
  await context.sync();

  series.points.load("items");
  await context.sync();

  // Style a substring in the first data label.
  let searchString = "sports";
  let dataLabel = series.points.getItemAt(dataLabelInfo[0].index).dataLabel.load("text");
  await context.sync();
  let substringStart = dataLabel.text.indexOf(searchString);
  let subLabel = dataLabel.getSubstring(substringStart, searchString.length);
  subLabel.font.size = 13;
  subLabel.font.bold = true;

  // Style a substring in the second data label.
  searchString = "'Titanic'";
  dataLabel = series.points.getItemAt(dataLabelInfo[1].index).dataLabel.load("text");
  await context.sync();

  substringStart = dataLabel.text.indexOf(searchString);
  subLabel = dataLabel.getSubstring(substringStart, searchString.length);
  subLabel.font.name = "Calibri";
  subLabel.font.size = 13;
  subLabel.font.italic = true;
  subLabel.font.color = "blue";
  await context.sync();
});

プロパティ

autoText

データ ラベルがコンテキストに基づいて適切なテキストを自動的に生成するかどうかを指定します。

context

オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。

format

グラフのデータ ラベルの書式設定を表します。

formula

A1 スタイルの表記法を使用するグラフのデータ ラベルの数式を表す文字列値。

geometricShapeType

データ ラベルの幾何学的形状の種類を指定します。 詳細については、Excel.GeometricShapeTypeを参照してください。 データ ラベルが幾何学的図形ではない場合、値は null です。

height

グラフのデータ ラベルの高さ (ポイント数) を返します。 グラフのデータ ラベルが表示されない場合は、値が null されます。

horizontalAlignment

グラフのデータ ラベルの水平方向の配置を表します。 詳細は「Excel.ChartTextHorizontalAlignment」をご覧ください。 このプロパティは、データ ラベルの TextOrientation が -90、90、または 180 の場合にのみ有効です。

left

グラフのデータ ラベルの左端からグラフ エリアの左端までの距離 (ポイント数) を表します。 グラフのデータ ラベルが表示されない場合は、値が null されます。

linkNumberFormat

数値の表示形式をセルにリンクするかどうかを指定します (これにより、数値の表示形式がセル内で変更されるときにラベルの表示形式が変更されるようにします)。

numberFormat

データ ラベルのフォーマット コードを指定します。

position

データ ラベルの位置を表す値。 詳細は「Excel.ChartDataLabelPosition」をご覧ください。

separator

グラフのデータ ラベルに使用される区切り文字を表す文字列。

showAsStickyCallout

データ ポイントにテール アンカーがアタッチされた吹き出しとしてデータ ラベルを表示するかどうかを指定します。 true の場合、吹き出しは次の値のいずれかになります: "AccentCallout1"、"AccentCallout2"、"BorderCallout1"、"BorderCallout2"、"WedgeRectCallout"、"WedgeRRectCallout"、または "WedgeEllipseCallout"。 詳細については、 GeometricShapeType を参照してください。

showBubbleSize

データ ラベルのバブル サイズを表示するかどうかを指定します。

showCategoryName

データ ラベル カテゴリ名を表示するかどうかを指定します。

showLegendKey

データ ラベルの凡例キーを表示するかどうかを指定します。

showPercentage

データ ラベルのパーセンテージを表示するかどうかを指定します。

showSeriesName

データ ラベル系列名を表示するかどうかを指定します。

showValue

データ ラベルの値が表示されるかどうかを指定します。

text

グラフのデータ ラベルのテキストを表す文字列。

textOrientation

グラフのデータ ラベルに対してテキストが配置される角度を表します。 値は、-90 から 90 までの整数、または垂直方向のテキストの場合は 180 の整数にする必要があります。

top

グラフのデータ ラベルの上端からグラフ エリアの上端までの距離 (ポイント数) を表します。 グラフのデータ ラベルが表示されない場合は、値が null されます。

verticalAlignment

グラフのデータ ラベルの垂直方向の配置を表します。 詳細は「Excel.ChartTextVerticalAlignment」をご覧ください。 このプロパティは、データ ラベルの TextOrientation が 0 の場合にのみ有効です。

width

グラフのデータ ラベルの幅 (ポイント数) を返します。 グラフのデータ ラベルが表示されない場合は、値が null されます。

メソッド

getSubstring(start, length)

データ ラベルの部分文字列を返します。 改行文字 '\n' は 1 文字としてカウントされます。

getTailAnchor()

固定コールアウトとして表示されるデータ ラベルのテール アンカーを返します。

load(options)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNames)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNamesAndPaths)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

set(properties, options)

オブジェクトの複数のプロパティを同時に設定します。 適切なプロパティを持つプレーン オブジェクト、または同じ型の別の API オブジェクトを渡すことができます。

set(properties)

既存の読み込まれたオブジェクトに基づいて、オブジェクトに複数のプロパティを同時に設定します。

setHeight(height)

データ ラベルの高さをポイント単位で設定します。

setWidth(width)

データ ラベルの幅をポイント単位で設定します。

toJSON()

API オブジェクトが JSON.stringify() に渡されるときに、より有用な出力を提供するために、JavaScript toJSON() メソッドをオーバーライドします。 (次に、JSON.stringify渡されたオブジェクトの toJSON メソッドを呼び出します)。元の Excel.ChartDataLabel オブジェクトが API オブジェクトであるのに対し、 toJSON メソッドは、元のオブジェクトから読み込まれた子プロパティの浅いコピーを含むプレーンな JavaScript オブジェクト ( Excel.Interfaces.ChartDataLabelData と型指定) を返します。

プロパティの詳細

autoText

データ ラベルがコンテキストに基づいて適切なテキストを自動的に生成するかどうかを指定します。

autoText: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.8

context

オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。

context: RequestContext;

プロパティ値

format

グラフのデータ ラベルの書式設定を表します。

readonly format: Excel.ChartDataLabelFormat;

プロパティ値

注釈

API セット: ExcelApi 1.8

formula

A1 スタイルの表記法を使用するグラフのデータ ラベルの数式を表す文字列値。

formula: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.8

geometricShapeType

データ ラベルの幾何学的形状の種類を指定します。 詳細については、Excel.GeometricShapeTypeを参照してください。 データ ラベルが幾何学的図形ではない場合、値は null です。

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"

注釈

API セット: ExcelApi 1.19

height

グラフのデータ ラベルの高さ (ポイント数) を返します。 グラフのデータ ラベルが表示されない場合は、値が null されます。

readonly height: number;

プロパティ値

number

注釈

API セット: ExcelApi 1.8

horizontalAlignment

グラフのデータ ラベルの水平方向の配置を表します。 詳細は「Excel.ChartTextHorizontalAlignment」をご覧ください。 このプロパティは、データ ラベルの TextOrientation が -90、90、または 180 の場合にのみ有効です。

horizontalAlignment: Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed";

プロパティ値

Excel.ChartTextHorizontalAlignment | "Center" | "Left" | "Right" | "Justify" | "Distributed"

注釈

API セット: ExcelApi 1.8

left

グラフのデータ ラベルの左端からグラフ エリアの左端までの距離 (ポイント数) を表します。 グラフのデータ ラベルが表示されない場合は、値が null されます。

left: number;

プロパティ値

number

注釈

API セット: ExcelApi 1.8

linkNumberFormat

数値の表示形式をセルにリンクするかどうかを指定します (これにより、数値の表示形式がセル内で変更されるときにラベルの表示形式が変更されるようにします)。

linkNumberFormat: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.9

numberFormat

データ ラベルのフォーマット コードを指定します。

numberFormat: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.8

position

データ ラベルの位置を表す値。 詳細は「Excel.ChartDataLabelPosition」をご覧ください。

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"

注釈

API セット: ExcelApi 1.7

separator

グラフのデータ ラベルに使用される区切り文字を表す文字列。

separator: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.7

showAsStickyCallout

データ ポイントにテール アンカーがアタッチされた吹き出しとしてデータ ラベルを表示するかどうかを指定します。 true の場合、吹き出しは次の値のいずれかになります: "AccentCallout1"、"AccentCallout2"、"BorderCallout1"、"BorderCallout2"、"WedgeRectCallout"、"WedgeRRectCallout"、または "WedgeEllipseCallout"。 詳細については、 GeometricShapeType を参照してください。

readonly showAsStickyCallout: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.19

showBubbleSize

データ ラベルのバブル サイズを表示するかどうかを指定します。

showBubbleSize: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.7

showCategoryName

データ ラベル カテゴリ名を表示するかどうかを指定します。

showCategoryName: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.7

showLegendKey

データ ラベルの凡例キーを表示するかどうかを指定します。

showLegendKey: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.7

showPercentage

データ ラベルのパーセンテージを表示するかどうかを指定します。

showPercentage: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.7

showSeriesName

データ ラベル系列名を表示するかどうかを指定します。

showSeriesName: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.7

showValue

データ ラベルの値が表示されるかどうかを指定します。

showValue: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.7

text

グラフのデータ ラベルのテキストを表す文字列。

text: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.8

textOrientation

グラフのデータ ラベルに対してテキストが配置される角度を表します。 値は、-90 から 90 までの整数、または垂直方向のテキストの場合は 180 の整数にする必要があります。

textOrientation: number;

プロパティ値

number

注釈

API セット: ExcelApi 1.8

top

グラフのデータ ラベルの上端からグラフ エリアの上端までの距離 (ポイント数) を表します。 グラフのデータ ラベルが表示されない場合は、値が null されます。

top: number;

プロパティ値

number

注釈

API セット: ExcelApi 1.8

verticalAlignment

グラフのデータ ラベルの垂直方向の配置を表します。 詳細は「Excel.ChartTextVerticalAlignment」をご覧ください。 このプロパティは、データ ラベルの TextOrientation が 0 の場合にのみ有効です。

verticalAlignment: Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed";

プロパティ値

Excel.ChartTextVerticalAlignment | "Center" | "Bottom" | "Top" | "Justify" | "Distributed"

注釈

API セット: ExcelApi 1.8

width

グラフのデータ ラベルの幅 (ポイント数) を返します。 グラフのデータ ラベルが表示されない場合は、値が null されます。

readonly width: number;

プロパティ値

number

注釈

API セット: ExcelApi 1.8

メソッドの詳細

getSubstring(start, length)

データ ラベルの部分文字列を返します。 改行文字 '\n' は 1 文字としてカウントされます。

getSubstring(start: number, length?: number): Excel.ChartFormatString;

パラメーター

start

number

データ ラベル内の部分文字列の 0 から始まる文字の位置。

length

number

省略可能。 部分文字列の文字数。 length を省略すると、データ ラベルの先頭から末尾までのすべての文字が取得されます。

返品

注釈

API セット: ExcelApi 1.19

getTailAnchor()

固定コールアウトとして表示されるデータ ラベルのテール アンカーを返します。

getTailAnchor(): Excel.ChartDataLabelAnchor;

返品

注釈

API セット: ExcelApi 1.19

load(options)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(options?: Excel.Interfaces.ChartDataLabelLoadOptions): Excel.ChartDataLabel;

パラメーター

options
Excel.Interfaces.ChartDataLabelLoadOptions

読み込むオブジェクトのプロパティのオプションを指定します。

返品

load(propertyNames)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNames?: string | string[]): Excel.ChartDataLabel;

パラメーター

propertyNames

string | string[]

読み込むプロパティを指定するコンマ区切りの文字列または文字列の配列。

返品

load(propertyNamesAndPaths)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNamesAndPaths?: {
            select?: string;
            expand?: string;
        }): Excel.ChartDataLabel;

パラメーター

propertyNamesAndPaths

{ select?: string; expand?: string; }

propertyNamesAndPaths.select は読み込むプロパティを指定するコンマ区切りの文字列であり、 propertyNamesAndPaths.expand は読み込むナビゲーションのプロパティを指定するコンマ区切りの文字列です。

返品

set(properties, options)

オブジェクトの複数のプロパティを同時に設定します。 適切なプロパティを持つプレーン オブジェクト、または同じ型の別の API オブジェクトを渡すことができます。

set(properties: Interfaces.ChartDataLabelUpdateData, options?: OfficeExtension.UpdateOptions): void;

パラメーター

properties
Excel.Interfaces.ChartDataLabelUpdateData

メソッドが呼び出されたオブジェクトのプロパティと同型構造のプロパティを持つ JavaScript オブジェクト。

options
OfficeExtension.UpdateOptions

プロパティ オブジェクトが読み取り専用プロパティを設定しようとした場合にエラーを抑制するオプションを提供します。

返品

void

set(properties)

既存の読み込まれたオブジェクトに基づいて、オブジェクトに複数のプロパティを同時に設定します。

set(properties: Excel.ChartDataLabel): void;

パラメーター

返品

void

setHeight(height)

データ ラベルの高さをポイント単位で設定します。

setHeight(height: number): void;

パラメーター

height

number

データ ラベルの高さ (ポイント単位)。

返品

void

注釈

API セット: ExcelApi 1.19

setWidth(width)

データ ラベルの幅をポイント単位で設定します。

setWidth(width: number): void;

パラメーター

width

number

データ ラベルの幅 (ポイント単位)。

返品

void

注釈

API セット: ExcelApi 1.19

toJSON()

API オブジェクトが JSON.stringify() に渡されるときに、より有用な出力を提供するために、JavaScript toJSON() メソッドをオーバーライドします。 (次に、JSON.stringify渡されたオブジェクトの toJSON メソッドを呼び出します)。元の Excel.ChartDataLabel オブジェクトが API オブジェクトであるのに対し、 toJSON メソッドは、元のオブジェクトから読み込まれた子プロパティの浅いコピーを含むプレーンな JavaScript オブジェクト ( Excel.Interfaces.ChartDataLabelData と型指定) を返します。

toJSON(): Excel.Interfaces.ChartDataLabelData;

返品