ChartCorridorKey AddChartCorridor(ChartCorridorsId tCorridors, SetChartCorridorArg tArg)
tCorridors. Moniker for working with chart corridors.
tArg. Operation execution parameters.
The AddChartCorridor operation creates a chart corridor.
To execute the operation, in the tCorridors field specify moniker for working with chart corridors, and in the tArg field specify parameters of the created corridor. 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'!Corridors.
The operation results in the key of the created corridor.
Below is the example of adding a chart corridor. The request contains moniker for working with corridors and parameters of the added corridor. The response contains key of the created corridor.
{
"AddChartCorridor" :
{
"tCorridors" :
{
"id" : "EDKKJPHJEHILFOAEPIMEEFNEPLBBPMIENIOCOOKNODOIOCGE!M!S!PPDJOMGIJEHILFOAEKDIEBFPLEKLKDGJEDJIIBCHBAEAKDPIA!Sheets!1!Objects!PrxChart1!Corridors"
},
"tArg" :
{
"meta" :
{
"s1" : "2",
"s2" : "3",
"gf" : "true",
"tp" : "50"
}
}
}
}
{
"AddChartCorridorResult" :
{
"k" : "1"
}
}
public static ChartCorridorKey AddChartCorridor(string chartMoniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tAdd = new AddChartCorridor()
{
tCorridors = new ChartCorridorsId
{
id = chartMoniker + "!Corridors"
},
tArg = new SetChartCorridorArg()
{
meta = new ChartCorridor()
{
s1 = 2,
s2 = 3,
gf = true,
tp = 50
}
}
};
// Create a chart corridor
var result = somClient.AddChartCorridor(tAdd);
return result;
}
See also: