bool AddChartAxisLevelLine(LevelLinesId tLevelLinesId, ChartAxisLevelLine tArg)
tLevelLinesId. Moniker for working with chart axis level lines.
tArg. Settings of added level line.
The AddChartAxisLevelLine operation adds a level line for chart axis.
To execute the operation, in the tLevelLinesId field specify moniker for working with level lines, and in the tArg field determine settings of added level line. Moniker format: Regular report instance moniker!Sheets!sheet key!Objects!chart identifier!axis identifier!LevelLines. The following axis identifiers are available:
AxisX - for X axis.
AxisY - for Y axis.
The operation results in the logical True if a level line was added successfully.
Below is the example of adding a level line for chart axis. The request contains moniker for working with level lines and for setting up the added level line. The response contains whether addition was successful.
{
"AddChartAxisLevelLine" :
{
"tLevelLinesId" :
{
"id" : "IOBMGLDPOIBOFOAEONLPLMHPBOFJKECEFJFPJDPALBEBLOAJ!M!S!PKAKNIPDPOIBOFOAEFGIEKKHIJGANGHCEBKHAMGBHBJHFEANF!Sheets!1!Objects!PrxChart1!AxisY!LevelLines"
},
"tArg" :
{
"v" : "0",
"callft" : "1",
"ls" :
{
"clr" : "#FF0000",
"w" : "1"
},
"lb" :
{
"v" : "true",
"mt" : "Maximum"
}
}
}
}
{
"AddChartAxisLevelLineResult" : "1"
}
public static bool AddChartAxisLevelLine(string moniker, string sheetKey, string chartId, string axis)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tAdd = new AddChartAxisLevelLine()
{
tArg = new ChartAxisLevelLine()
{
v = 0,
callft = 1,
ls = new ChartLineBase()
{
w = 1,
clr = "#FF0000" // Red color
},
lb = new ChartAxisLevelLineLabel()
{
v = true,
mt = "Maximum"
}
},
tLevelLinesId = new LevelLinesId() { id = moniker + "!Sheets!" + sheetKey + "!Objects!" + chartId + '!' + axis + "!LevelLines" }
};
// Add a level line for chart axis
var result = somClient.AddChartAxisLevelLine(tAdd);
return result;
}
See also: