SetChartSerie

Syntax

bool SetChartSerie(SerieId tSerie, ChartSerie tArg)

Parameters

tSerie. Chart series moniker.

tArg. Series settings that should be applied.

Description

The SetChartSerie operation changes chart series settings.

Comments

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:

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

Example

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.

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">
<SetChartSerie xmlns="http://www.fsight.ru/PP.SOM.Som">
<tSerie xmlns="">
  <id>NNLEMMGHNIACGOAEMEELDOGHCOBLJOMEDICAJEEDODMDPNPB!M!S!PHEBCPDHHNIACGOAEHJICHGPOHKLHNDLELKPPOJFBOGIEGJIP!Sheets!1!Objects!PrxChart1!Series!1</id>
  </tSerie>
<tArg xmlns="">
  <type>2</type>
<gfill>
  <cf>#FF0000</cf>
  <ct>#0000FF</ct>
  <tp>30</tp>
  <a>5</a>
  <deff>false</deff>
  <deft>true</deft>
  </gfill>
<bd>
  <clr>#FF0000</clr>
  <s>0</s>
  <w>0.3</w>
  <enabled>true</enabled>
  <cdef>true</cdef>
  </bd>
  <v>true</v>
  </tArg>
  </SetChartSerie>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

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

JSON response:

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

Chart