SetChartGraphArea

Syntax

bool SetChartGraphArea(ChartGraphAreaId tGraphArea, ChartGraphArea tArg)

Parameters

mon. Moniker of chart plot area.

tArg. Plot area parameters that should be applied.

Description

The SetChartGraphArea operation changes chart plot area settings.

Comments

To execute the operation, in the tGraphArea field specify plot area moniker, and in the tArg field specify the 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 the following format: 'Chart moniker'!GraphArea.

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

Example

Below is the example of changing chart plot area settings. The request contains moniker for working with plot area and the 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">
<SetChartGraphArea xmlns="http://www.fsight.ru/PP.SOM.Som">
<tGraphArea xmlns="">
  <id>EDKKJPHJEHILFOAEPIMEEFNEPLBBPMIENIOCOOKNODOIOCGE!M!S!PPDJOMGIJEHILFOAEKDIEBFPLEKLKDGJEDJIIBCHBAEAKDPIA!Sheets!1!Objects!PrxChart1!GraphArea</id>
  </tGraphArea>
<tArg xmlns="">
<bg>
  <type>2</type>
<gfill>
  <cf>#00FF00</cf>
  <ct>#00FFFF</ct>
  <tp>0</tp>
  <a>45</a>
  </gfill>
  </bg>
<bd>
  <clr>#000000</clr>
  <s>0</s>
  <enabled>true</enabled>
  </bd>
  </tArg>
  </SetChartGraphArea>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"SetChartGraphArea" :
{
"tGraphArea" :
{
"id" : "EDKKJPHJEHILFOAEPIMEEFNEPLBBPMIENIOCOOKNODOIOCGE!M!S!PPDJOMGIJEHILFOAEKDIEBFPLEKLKDGJEDJIIBCHBAEAKDPIA!Sheets!1!Objects!PrxChart1!GraphArea"
},
"tArg" :
{
"bg" :
{
"type" : "2",
"gfill" :
{
"cf" : "#00FF00",
"ct" : "#00FFFF",
"tp" : "0",
"a" : "45"
}
},
"bd" :
{
"clr" : "#000000",
"s" : "0",
"enabled" : "true"
}
}
}
}

JSON response:

{
"SetChartGraphAreaResult" : "1"
}
public static bool SetChartGraphArea(string chartMoniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetChartGraphArea()
{
tGraphArea = new ChartGraphAreaId()
{
id = chartMoniker + "!GraphArea"
},
tArg = new ChartGraphArea()
{
bg = new ChartBackgroundSettings()
{
type = 2, //Gradient
gfill = new ChartGradientFillSettings()
{
cf = "#00FF00", //Lime
ct = "#00FFFF", //Cyan
a = 45
}
},
bd = new ChartLine()
{
enabled = true,
s = 0,
clr = "#000000" //Black
}
}
};
// Change plot area settings
var result = somClient.SetChartGraphArea(tSet);
return result;
}

See also:

Chart