DashboardVisualizer DashboardVisualizersAdd(string mon, DashboardVisualizer tArg)
mon. Moniker for working with information panel visualizers.
tArg. Settings of added visualizer.
The DashboardVisualizersAdd operation adds a new visualizer to information panel.
To execute the operation, in the mon field specify moniker of opened information panel instance with the !Visualizers postfix, and in the tArg field specify settings of created visualizer. If the visualizer is added to slide, define the tArg.parentKey field. The moniker can be obtained on executing the OpenDashboard operation.
The operation results in the key of the created visualizer and key of the created metamodel. The metamodel should be linked with a data source using the DashboardMetaModelSetLayer operation.
Below is the example of creating a new visualizer in information panel. The request contains moniker for working with visualizers, type and settings of new visualizer. The response contains the key generated for the new visualizer.
{
"DashboardVisualizersAdd" :
{
"mon" : "NGDHDGCPEHADGOAENOBLDBIDDCDEGILEPLMLPCIIGMNMBLKH!M!S!PLHPAOLCPEHADGOAEAHKONCEDOLHDDIAEGIKMEIJNDDGMDEOI!Visualizers",
"tArg" :
{
"k" : "0",
"x" : "0",
"y" : "0",
"height" : "200",
"width" : "400",
"type" : "Chart",
"chartType" : "Lines"
}
}
}
{
"DashboardVisualizersAddResult" :
{
"k" : "3",
"metaModelKey" : "3"
}
}
public static DashboardVisualizer DashboardVisualizersAdd(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tAdd = new DashboardVisualizersAdd()
{
tArg = new DashboardVisualizer()
{
type = SomDashboardVisualizerType.Chart,
chartType = SomDashboardChartType.Lines,
x = 0,
y = 0,
height = 200,
width = 400
},
// Moniker for working with information panel visualizers
mon = moniker + "!Visualizers"
};
// Add visualizer
var result = somClient.DashboardVisualizersAdd(tAdd);
return result;
}
See also: