Show TOC

Function documentationiChart Methods Locate this document in the navigation structure

 

You can use scripting methods to return information from an SAP Manufacturing Integration and Intelligence (SAP MII) chart.

Features

The following table lists common methods to use with charts:

Method

Use

iChartComponent getChartObject()

Gets a reference to the underlying chart display object (the iChartComponent class)

void updateChart(boolean bReloadData)

Updates the chart contents. The parameter indicates whether to re-read the underlying data. This method differs from the refresh() method when the underlying query is time-based; this method updates the start and end dates based on the current time less the duration/duration units. The updateChart method uses the specified dates.

void doPrint()

Displays a printable HTML page with a GIF representation of the current chart.

int getTagCount()

Gets the current number of tags in the chart and legend.

boolean isTagAssigned(int nPen)

Determines if one of the 32 pen slots is assigned to a tag.

int getSelectedPen()

Gets the pen number that is selected in the chart legend.

void setSelectedPen(int nPen)

Selects a pen number in the chart legend.

String getTagDescription(int nPen)

Gets the description for the pen.

String getTagName(int nPen)

Gets the tag name (or virtual tag name) for the pen.

String getSelectedTagName()

Gets the pen name that is selected in the chart legend.

String getDatalinkValue(int TagNumber, int PointNumber, int AttributeIndex)

Gets additional data bound to the pen (usually done with tag queries).

String getDatalinkColumn(int index)

Returns a string value that represents the datalink value for the item at the input index in the value list.

int getLastSelectedTag()

Returns the last tag selected in the chart menu.

int getLastSelectedPoint()

Returns the index of the last selected point in the chart.

int getNumberOfDataPoints(int nPen)

Gets the number of data values associated with the pen.

double getYDataValueAt(int nPen, int dataindex)

Gets the underlying y-axis data value for the pen and data item.

double getXDataValueAt(int nPen, int dataindex)

Gets the underlying x-axis value for the pen and data item.

long getChartWidth()

Gets the current time interval, in milliseconds, for the chart.

void zoomFullScale()

Zooms the chart to its full range limits.

void zoomToCursor()

Zooms the chart to the selected cursor range which is defined by dragging your mouse over the area.

void zoomBox(double dHorizontal, double dVertical)

Zooms the chart to a percentage of the currently visible range or chart width. The center of the chart remains the same. To zoom one dimension, enter 100 percent for the range you do not want to zoom. The range for both parameters is 0 to 1000.

void scrollBox(double dHorizontal, double dVertical)

Scrolls the chart to a percentage of the currently visible range or chart width. The minimum and maximum ranges and chart width remain the same. To scroll one dimension, use zero percent for the range you do not want to scroll. The range for both parameters is -100.0 to 100.0.

double getXAxisZoomMin()

double getXAxisZoomMax()

double getYAxisZoomMin()

double getYAxisZoomMax()

Return the zoom minimum and maximum ranges for each of the axes. The default values are zero (minimum) and 100 (maximum).

void setXAxisZoomMin(double dMin)

void setXAxisZoomMax(double dMax)

void setYAxisZoomMin(double dMin)

void setYAxisZoomMax(double dMax)

Sets the zoom minimum and maximum ranges for each of the axes. The default values are zero (minimum) and 100 (maximum). This can be used to programmatically zoom and externally pan the chart.

double getEffectiveMinRange(int PenIndex)

Returns the minimum range value for the current view of the pen index.

double getEffectiveMaxRange(int PenIndex)

Returns the maximum range value for the current view of the pen index.