EGraph.getElement(index)
|
Represent Multiple Measure to add multiple elements. |
Returns a handle to the GraphElement object specified by the index. This is useful in cases where the element was not explicitly assigned to a variable at creation time. To add an element, use EGraph.addElement(elem).
Example
Follow the steps below:
-
Create a Dashboard based on the ‘Sales Explore’ Data Worksheet. (See Create a New Dashboard.)
The 'Sales Explore' Data Worksheet can be found in . You may need to download the examples.zip file from GitHub into your environment. (This requires access to Enterprise Manager.) See Import and Export Assets for instructions on how to import. -
Add a Bar Chart with ‘Company’ (top 5) on the X-axis, and Sum(Total) on the Y-axis.
-
Add the following script:
Chart Component Scriptvar elem = graph.getElement(0); (1) elem.setHint(GraphElement.HINT_SHINE,'false'); (2)1 Obtain handle to GraphElementobject.2 Apply operations to GraphElementobject.
Script that modifies the graph or dataset properties should be placed on the Chart component itself. See Add Component Script for more information. This script has access to the Chart data and Chart API methods. Scripted Charts are not good candidates for user-modification, so you should deselect ‘Enable Ad Hoc Editing’ in the Chart Properties dialog box.
|