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).

Parameter

index

Integer index of element

Example

Follow the steps below:

  1. Create a Dashboard based on the ‘Sales Explore’ Data Worksheet. (See Create a New Dashboard.)

    The 'Sales Explore' Data Worksheet can be found in Data Worksheet  Examples. 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.
  2. Add a Bar Chart with ‘Company’ (top 5) on the X-axis, and Sum(Total) on the Y-axis.

  3. Add the following script:

    Chart Component Script
    var elem = graph.getElement(0); (1)
    elem.setHint(GraphElement.HINT_SHINE,'false'); (2)
    1 Obtain handle to GraphElement object.
    2 Apply operations to GraphElement object.

    EGraphgetElement

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.