ChartLabels GetChartLabels(ChartId tChart)
tChart. Chart moniker.
The GetChartLabels operation gets settings of all data labels specified for chart series/points.
To execute the operation, in the tLabel field specify chart moniker. The chart moniker is based on the moniker of the repository object, which chart is worked with, according to the following rules:
"Express report instance moniker"!Chart. Express report chart (if the express report consists of a single sheet).
"Express report instance moniker"!Sheets!"Sheet key"!Chart. Chart of the selected express report sheet (if the express report consists of several sheets).
"Workbook instance moniker"!Chart. Workbook chart (if the workbook consists of a single sheet).
"Workbook instance moniker"!Sheets!"Sheet key"!Chart. Chart of specified workbook sheet (if the workbook consists of several sheets).
"Regular report instance moniker"!Sheets!"Sheet key"!Objects!"Chart identifier". Chart positioned on a regular report sheet.
The operation results in the data label settings determined for chart series/series points.
Below is the example of getting settings of all data labels determined for chart series/series points. The request contains chart moniker. The response contains the obtained settings.
{
"GetChartLabels" :
{
"tChart" :
{
"id" : "S1!M!S!P1!Sheets!1!Objects!PrxChart3"
}
}
}
{
"GetChartLabelsResult" :
{
"labels" :
{
"it" :
[
{
"v" : "1",
"p" : "Left",
"t" : "X: %XValue",
"f" :
{
"family" : "Tahoma",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "8",
"units" : "Pt"
}
},
"fc" : "#918F8D"
},
{
"v" : "1",
"p" : "Left",
"t" : "X: %XValue",
"f" :
{
"family" : "Tahoma",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "8",
"units" : "Pt"
}
},
"fc" : "#918F8D"
},
{
"v" : "1",
"p" : "Left",
"t" : "X: %XValue",
"f" :
{
"family" : "Tahoma",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "8",
"units" : "Pt"
}
},
"fc" : "#918F8D"
},
{
"v" : "1",
"p" : "Left",
"t" : "X: %XValue",
"f" :
{
"family" : "Tahoma",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "8",
"units" : "Pt"
}
},
"fc" : "#918F8D"
},
{
"v" : "1",
"p" : "Left",
"t" : "X: %XValue",
"f" :
{
"family" : "Tahoma",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "8",
"units" : "Pt"
}
},
"fc" : "#918F8D"
}
]
}
}
}
public static ChartLabels GetChartLabels(string chartMoniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetChartLabels()
{
tChart = new ChartId()
{
id = chartMoniker
}
};
// Get data label settings
var result = somClient.GetChartLabels(tGet);
return result;
}
See also: