Workbook session Id that determines if changes are persisted or not. Optional.
Request body
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.
Property
Type
Description
position
string
DataLabelPosition value that represents the position of the data label. The possible values are: None, Center, InsideEnd, InsideBase, OutsideEnd, Left, Right, Top, Bottom, BestFit, Callout.
separator
string
String representing the separator used for the data labels on a chart.
showBubbleSize
boolean
Boolean value representing if the data label bubble size is visible or not.
showCategoryName
boolean
Boolean value representing if the data label category name is visible or not.
showLegendKey
boolean
Boolean value representing if the data label legend key is visible or not.
showPercentage
boolean
Boolean value representing if the data label percentage is visible or not.
showSeriesName
boolean
Boolean value representing if the data label series name is visible or not.
showValue
boolean
Boolean value representing if the data label value is visible or not.
Response
If successful, this method returns a 200 OK response code and updated WorkbookChartDataLabels object in the response body.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new WorkbookChartDataLabels
{
Position = "position-value",
ShowValue = true,
ShowSeriesName = true,
ShowCategoryName = true,
ShowLegendKey = true,
};
var result = await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Workbook.Worksheets["{workbookWorksheet-id}"].Charts["{workbookChart-id}"].DataLabels.PatchAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new WorkbookChartDataLabels();
$requestBody->setPosition('position-value');
$requestBody->setShowValue(true);
$requestBody->setShowSeriesName(true);
$requestBody->setShowCategoryName(true);
$requestBody->setShowLegendKey(true);
$result = $graphServiceClient->drives()->byDriveId('drive-id')->items()->byItemId('driveItem-id')->workbook()->worksheets()->byWorksheetId('workbookWorksheet-id')->charts()->byChartId('workbookChart-id')->dataLabels()->patch($requestBody);