SetChartLabel

Syntax

bool SetChartLabel(ChartLabelId tLabel, ChartLabel tArg)

Parameters

tLabel. Moniker for working with data labels.

tArg. Determined settings of data labels.

Description

The SetChartLabel operation changes settings of chart data labels.

Comments

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:

The operation results in the logical true if changes are successfully applied.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetChartLabel xmlns="http://www.fsight.ru/PP.SOM.Som">
<tLabel xmlns="">
  <id>S1!M!S!P1!Sheets!1!Objects!PrxChart3!Label</id>
  </tLabel>
<tArg xmlns="">
  <v>true</v>
  <p>Left</p>
  <t>X: %XValue</t>
  </tArg>
  </SetChartLabel>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetChartLabelResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SetChartLabelResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetChartLabel" :
{
"tLabel" :
{
"id" : "S1!M!S!P1!Sheets!1!Objects!PrxChart3!Label"
},
"tArg" :
{
"v" : "true",
"p" : "Left",
"t" : "X: %XValue"
}
}
}

JSON response:

{
"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:

Chart