bool SetChartLabel(ChartLabelId tLabel, ChartLabel tArg)
tLabel. Moniker for working with data labels.
tArg. Determined settings of data labels.
The SetChartLabel operation changes settings of chart data labels.
To execute the operation, in the tLabel field specify moniker for working with data labels, and in the tArg field specify determined settings. The moniker can be created based on the chart moniker specified in the GetChart, SetChart, GetChartSeries operations. The moniker is created in the following format:
Chart moniker!Label. Data labels for a default series.
Chart moniker!Series!Series index!Label. Data labels for a series with specified index.
Chart moniker!Series!Series index!Points!Label. Data labels for series points.
Chart moniker!Series!Series index!Points!Point index!Label. Data labels for series point with specified index.
The operation results in the logical true if changes are successfully applied.
Below is the example of changing chart data label settings. The request contains moniker for working with data labels and determined settings. The response contains whether settings are successfully applied.
{
"SetChartLabel" :
{
"tLabel" :
{
"id" : "S1!M!S!P1!Sheets!1!Objects!PrxChart3!Label"
},
"tArg" :
{
"v" : "true",
"p" : "Left",
"t" : "X: %XValue"
}
}
}
{
"SetChartLabelResult" : "1"
}
public static bool SetChartLabel(string chartMoniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetChartLabel()
{
tLabel = new ChartLabelId()
{
id = chartMoniker + "!Label"
},
tArg = new ChartLabel()
{
v = true,
p = ChartLabelPosition.Left,
t = "X: %XValue"
}
};
// Get data label settings
var result = somClient.SetChartLabel(tSet);
return result;
}
See also: