AddChartAxisLevelLine

Syntax

bool AddChartAxisLevelLine(LevelLinesId tLevelLinesId, ChartAxisLevelLine tArg)

Parameters

tLevelLinesId. Moniker for working with chart axis level lines.

tArg. Settings of added level line.

Description

The AddChartAxisLevelLine operation adds a level line for chart axis.

Comments

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:

The operation results in the logical True if a level line was added successfully.

Example

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.

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">
<AddChartAxisLevelLine xmlns="http://www.fsight.ru/PP.SOM.Som">
<tLevelLinesId xmlns="">
  <id>IOBMGLDPOIBOFOAEONLPLMHPBOFJKECEFJFPJDPALBEBLOAJ!M!S!PKAKNIPDPOIBOFOAEFGIEKKHIJGANGHCEBKHAMGBHBJHFEANF!Sheets!1!Objects!PrxChart1!AxisY!LevelLines</id>
  </tLevelLinesId>
<tArg xmlns="">
  <v>0</v>
  <callft>1</callft>
<ls>
  <clr>#FF0000</clr>
  <w>1</w>
  </ls>
<lb>
  <v>true</v>
  <mt>Maximum</mt>
  </lb>
  </tArg>
  </AddChartAxisLevelLine>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"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"
}
}
}
}

JSON response:

{
"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:

Chart