PrxMetaChart GetPrxMetaChart(string mon, PrxMetaChart tArg)
mon. Moniker for working with a chart.
tArg. Metadata that should be obtained for a chart.
The GetPrxMetaChart operation gets metadata of the chart located on a regular report sheet.
To execute the operation, in the mon field specify the regular report instance moniker with the !Sheets!sheet key!Objects!chart identifier postfix to work with a chart. In the tArg field set empty values or default values for the fields, which values should be obtained. Moniker of regular report instance can be obtained on executing the OpenPrxMeta operation.
The operation results in the requested metadata.
Below is the example of getting information about regular report chart. The request contains chart moniker. The response contains the obtained information.
{
"GetPrxMetaChart" :
{
"mon" : "LJCKBHFIAJEAGOAEEMIEIMBELEOLDDKEHLFAGLAKCMOKGDDM!M!S!PCBKPNKFIAJEAGOAECBPKIKLHHMNEMBAELJHMEKFCGPMJLGKM!Sheets!1!Objects!PrxChart5",
"tArg" :
{
"name" : "",
"data" : "",
"points" : "",
"series" : "",
"seriesInRows" : "true",
"chartSettings" : "",
"sourceType" : "Sheet",
"ptNames" : ""
}
}
}
{
"GetPrxMetaChartResult" :
{
"name" : "Indicators chart",
"data" : "H14:N17",
"points" : "H13:N13",
"series" : "G14:G17",
"seriesInRows" : "1",
"chartSettings" :
{
"type" : "1",
"view3d" : "0",
"uzs" : "1",
"bg" :
{
"type" : "1",
"sfill" :
{
"clr" : "#FFFFFF",
"tp" : "0"
}
},
"bd" :
{
"clr" : "#000000",
"s" : "1",
"w" : "2",
"enabled" : "1"
},
"ornt" : "0",
"accum" : "0",
"inter" : "Selection",
"zm" : "None",
"he" : "1",
"sts" : "0"
},
"sourceType" : "Sheet",
"ptNames" :
{
"its" :
[
"2000",
"I half-year 2000",
"I quarter 2000",
"II quarter 2000",
"II half-year 2000",
"III quarter 2000",
"IV quarter 2000"
]
}
}
}
public static PrxMetaChart GetPrxChart(string moniker, string sheetKey, string chartId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetPrxMetaChart()
{
tArg = new PrxMetaChart()
{
chartSettings = new ChartSettings(),
data = string.Empty,
name = string.Empty,
points = string.Empty,
series = string.Empty,
seriesInRows = true,
sourceType = new PrxMetaChartSourceType(),
ptNames = new string[0]
},
mon = moniker + "!Sheets!" + sheetKey + "!Objects!" + chartId
};
//Get chart information
var result = somClient.GetPrxMetaChart(tGet);
return result;
}
See also: