SetChartTrendLine

Syntax

bool SetChartTrendLine(SerieId tSerie, ChartTrendLine tArg)

Parameters

tSerie. Chart series moniker.

tArg. Trend line settings that should be applied.

Description

The SetChartTrendLine operation changes trend line settings for a data series.

Comments

To execute the operation, in the tSerie field specify series moniker. The moniker can be created based on the chart moniker specified in the GetChart, SetChart, GetChartSeries operations. The moniker is created in one of the following formats:

The operation results in the logical True if the settings were changed successfully.

Example

Below is the example of changing trend line settings for a data series. The request contains series moniker and settings to be applied. The response contains whether changes were applied successfully.

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">
<SetChartTrendLine xmlns="http://www.fsight.ru/PP.SOM.Som">
<tSerie xmlns="">
  <id>EDKKJPHJEHILFOAEPIMEEFNEPLBBPMIENIOCOOKNODOIOCGE!M!S!PPDJOMGIJEHILFOAEKDIEBFPLEKLKDGJEDJIIBCHBAEAKDPIA!Sheets!1!Objects!PrxChart1!Series!1</id>
  </tSerie>
<tArg xmlns="">
  <e>true</e>
  <tt>2</tt>
<ls>
  <clr>#000000</clr>
  <s>0</s>
  </ls>
  <dil>false</dil>
  <uat>true</uat>
  </tArg>
  </SetChartTrendLine>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetChartTrendLineResult 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</SetChartTrendLineResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetChartTrendLine" :
{
"tSerie" :
{
"id" : "EDKKJPHJEHILFOAEPIMEEFNEPLBBPMIENIOCOOKNODOIOCGE!M!S!PPDJOMGIJEHILFOAEKDIEBFPLEKLKDGJEDJIIBCHBAEAKDPIA!Sheets!1!Objects!PrxChart1!Series!1"
},
"tArg" :
{
"e" : "true",
"tt" : "2",
"ls" :
{
"clr" : "#000000",
"s" : "0"
},
"dil" : "false",
"uat" : "true"
}
}
}

JSON response:

{
"SetChartTrendLineResult" : "1"
}
public static bool SetChartTrendLine(string chartMoniker, ulong serieNumber)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetChartTrendLine()
{
tSerie = new SerieId() { id = chartMoniker + "!Series!" + serieNumber },
tArg = new ChartTrendLine()
{
e = true,
tt = 2, //Exponential
ls = new ChartLineBase()
{
s = 0,
clr = "#000000" //Black
},
dil = false,
uat = true
}
};
// Change trend line settings
var result = somClient.SetChartTrendLine(tSet);
return result;
}

See also:

Chart