bool SetChartGraphArea(ChartGraphAreaId tGraphArea, ChartGraphArea tArg)
mon. Moniker of chart plot area.
tArg. Plot area parameters that should be applied.
The SetChartGraphArea operation changes chart plot area settings.
To execute the operation, in the tGraphArea field specify plot area moniker, and in the tArg field specify the settings to be applied. 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'!GraphArea.
The operation results in the logical True if plot area settings were changed successfully.
Below is the example of changing chart plot area settings. The request contains moniker for working with plot area and the settings to be applied. The response contains whether changes were applied successfully.
{
"SetChartGraphArea" :
{
"tGraphArea" :
{
"id" : "EDKKJPHJEHILFOAEPIMEEFNEPLBBPMIENIOCOOKNODOIOCGE!M!S!PPDJOMGIJEHILFOAEKDIEBFPLEKLKDGJEDJIIBCHBAEAKDPIA!Sheets!1!Objects!PrxChart1!GraphArea"
},
"tArg" :
{
"bg" :
{
"type" : "2",
"gfill" :
{
"cf" : "#00FF00",
"ct" : "#00FFFF",
"tp" : "0",
"a" : "45"
}
},
"bd" :
{
"clr" : "#000000",
"s" : "0",
"enabled" : "true"
}
}
}
}
{
"SetChartGraphAreaResult" : "1"
}
public static bool SetChartGraphArea(string chartMoniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetChartGraphArea()
{
tGraphArea = new ChartGraphAreaId()
{
id = chartMoniker + "!GraphArea"
},
tArg = new ChartGraphArea()
{
bg = new ChartBackgroundSettings()
{
type = 2, //Gradient
gfill = new ChartGradientFillSettings()
{
cf = "#00FF00", //Lime
ct = "#00FFFF", //Cyan
a = 45
}
},
bd = new ChartLine()
{
enabled = true,
s = 0,
clr = "#000000" //Black
}
}
};
// Change plot area settings
var result = somClient.SetChartGraphArea(tSet);
return result;
}
See also: