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