GetChartLegend

Syntax

ChartLegend GetChartLegend(LegendId tLegend)

Parameters

tLegend. Chart legend moniker.

Description

The GetChartLegend operation gets chart legend settings.

Comments

To execute the operation, in the tLegend field specify a legend moniker. The moniker can be created based on the moniker of opened object instance, which chart legend is worked with. The chart legend moniker is created based on the moniker of the repository object, which chart is worked with, following the rules:

The operation results in legend settings.

Example

Below is the example of getting information about the chart legend located on the regular report sheet. The request contains legend moniker. The response contains requested data.

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">
<GetChartLegend xmlns="http://www.fsight.ru/PP.SOM.Som">
<tLegend xmlns="">
  <id>S1!M!S!P1!Sheets!1!Objects!PrxChart2!Legend</id>
  </tLegend>
  </GetChartLegend>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetChartLegendResult 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">
  <align xmlns="">Bottom</align>
<font xmlns="">
  <family>Tahoma</family>
<style>
  <it>Regular</it>
  </style>
<size>
  <width>-1</width>
  <height>8</height>
  <units>Pt</units>
  </size>
  </font>
  <fclr xmlns="">#918F8D</fclr>
<bg xmlns="">
  <type>0</type>
  </bg>
<bd xmlns="">
  <enabled>0</enabled>
  </bd>
  <sd xmlns="">0</sd>
  <si xmlns="">0</si>
<ss xmlns="">
  <width>3.5</width>
  <height>3.5</height>
  </ss>
  <ap xmlns="">1</ap>
  <ds xmlns="">0</ds>
  <ml xmlns="">0</ml>
  <ea xmlns="">Center</ea>
<mrg xmlns="">
  <left>0</left>
  <top>0</top>
  <right>0</right>
  <bottom>0</bottom>
  </mrg>
  <amrg xmlns="">1</amrg>
  </GetChartLegendResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetChartLegend" :
{
"tLegend" :
{
"id" : "S1!M!S!P1!Sheets!1!Objects!PrxChart2!Legend"
}
}
}

JSON response:

{
"GetChartLegendResult" :
{
"align" : "Bottom",
"font" :
{
"family" : "Tahoma",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "8",
"units" : "Pt"
}
},
"fclr" : "#918F8D",
"bg" :
{
"type" : "0"
},
"bd" :
{
"enabled" : "0"
},
"sd" : "0",
"si" : "0",
"ss" :
{
"width" : "3.5",
"height" : "3.5"
},
"ap" : "1",
"ds" : "0",
"ml" : "0",
"ea" : "Center",
"mrg" :
{
"left" : "0",
"top" : "0",
"right" : "0",
"bottom" : "0"
},
"amrg" : "1"
}
}
public static ChartLegend GetChartLegend(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetChartLegend()
{
tLegend = new LegendId()
{
id = moniker
}
};
// Get legend settings
var result = somClient.GetChartLegend(tGet);
return result;
}

See also:

Chart