EGraph.getCoordinate()

Returns a handle to the graph’s Coordinate object. This is useful in cases where the coordinates were not explicitly assigned to a variable at creation time. The corresponding “setter” function is EGraph.setCoordinate(coord).

Returns

A Coordinate object

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 coord = graph.getCoordinate(); (1)
    coord.transpose(); (2)
    1 Obtain handle to Coordinate object.
    2 Apply operations to Coordinate object.
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.