bool SetChartSerie(SerieId tSerie, ChartSerie tArg)
tSerie. Chart series moniker.
tArg. Series settings that should be applied.
The SetChartSerie operation changes chart series settings.
To execute the operation, in the tSerie field specify series moniker, and in the tArg field specify series settings to be applied. 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 series settings were changed successfully.
Below is the example of changing settings for series of the chart added to regular report sheet. The request contains series moniker and settings that should be applied. The response contains whether changes were applied successfully.
{
"SetChartSerie" :
{
"tSerie" :
{
"id" : "NNLEMMGHNIACGOAEMEELDOGHCOBLJOMEDICAJEEDODMDPNPB!M!S!PHEBCPDHHNIACGOAEHJICHGPOHKLHNDLELKPPOJFBOGIEGJIP!Sheets!1!Objects!PrxChart1!Series!1"
},
"tArg" :
{
"type" : "2",
"gfill" :
{
"cf" : "#FF0000",
"ct" : "#0000FF",
"tp" : "30",
"a" : "5",
"deff" : "false",
"deft" : "true"
},
"bd" :
{
"clr" : "#FF0000",
"s" : "0",
"w" : "0.3",
"enabled" : "true",
"cdef" : "true"
},
"v" : "true"
}
}
}
{
"SetChartSerieResult" : "1"
}
public static bool SetChartSerie(string chartMoniker, uint serieNumber)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetChartSerie()
{
tArg = new ChartSerie()
{
type = 2,
gfill = new ChartGradientFillSettings()
{
cf = "#FF0000",
ct = "#0000FF",
tp = 30,
a = 5,
deff = false,
deft = true
},
bd = new ChartBorderSettings()
{
enabled = true,
clr = "#FF0000",
s = 0,
w = 0.3,
cdef = true
},
v = true
},
tSerie = new SerieId() { id = chartMoniker + "!Series!" + serieNumber }
};
// Change chart series settings
var result = somClient.SetChartSerie(tSet);
return result;
}
See also: