bool SetChartTrendLine(SerieId tSerie, ChartTrendLine tArg)
tSerie. Chart series moniker.
tArg. Trend line settings that should be applied.
The SetChartTrendLine operation changes trend line settings for a data series.
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:
Chart moniker!Series!Default. It is used to work with default chart series settings.
Chart moniker!Series!Series index. It is used to work with settings of the chart series with the specified index. Indexing starts from zero.
The operation results in the logical True if the settings were changed successfully.
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.
{
"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"
}
}
}
{
"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: