ChartDirector 7.0 (Java Edition)

ChartViewer


The ChartViewer control is a SWING control for viewing ChartDirector charts. It is a subclass of the JLabel control. Apart from displaying the charts, its main functions are to support advanced user interactions with the charts, including:

ChartViewer Members

The followings are members specific to the ChartViewer control. Members inherited from the JLabel control are omitted. Please refer to Java documentation for members of the JLabel control.

MethodInheritedDescription
ChartViewer(Self)Constructor for the ChartViewer component.
setChart(Self)Sets a BaseChart object for display.
getChart(Self)Gets the BaseChart pointer provided by the previous ChartViewer.setChart method call.
setImage(Self)Sets the chart image to view.
getImage(Self)Gets the chart image that is being viewed.
setImageMap(Self)Sets the image map that defines the hot spots on the chart image.
getImageMap(Self)Gets the image map that is currently in use for defining the hot spots.
disposeReference(Self)Remove the stored reference to the BaseChart object and image map string set using ChartViewer.setChart and ChartViewer.setImageMap.
getChartMouseX(Self)Gets the mouse x-coordinate in the chart pixel coordinate system.
getChartMouseY(Self)Gets the mouse y-coordinate in the chart pixel coordinate system.
getPlotAreaMouseX(Self)Gets the mouse x-coordinate on the plot area in the chart pixel coordinate system.
getPlotAreaMouseY(Self)Gets the mouse y-coordinate on the plot area in the chart pixel coordinate system.
setPlotAreaMouseMargin(Self)Sets all margins (left, right, top, and bottom) of the plot area mouse event region to the same value.
setPlotAreaMouseMargin2(Self)Sets the margins of the plot area mouse event region.
removeDynamicLayer(Self)Calls BaseChart.removeDynamicLayer when the specified event occurs.
updateDisplay(Self)Updates the display.
setViewPortLeft(Self)Sets the position of the left side of the viewport.
getViewPortLeft(Self)Gets the position of the left side of the viewport.
setViewPortTop(Self)Sets the position of the top side of the viewport.
getViewPortTop(Self)Gets the position of the top side of the viewport.
setViewPortWidth(Self)Sets the width of the viewport.
getViewPortWidth(Self)Gets the width of the viewport.
setViewPortHeight(Self)Sets the height of the viewport.
getViewPortHeight(Self)Gets the height of the viewport.
validateViewPort(Self)Ensures the viewport left, top, width and height are within valid ranges and adjusts them if necessary.
updateViewPort(Self)Triggers the ViewPortChanged event.
setFullRange(Self)Defines the full range of a viewport data scale.
updateFullRangeH(Self)Updates the full range of a horizontal viewport data scale.
updateFullRangeV(Self)Updates the full range of a vertical viewport data scale.
getValueAtViewPort(Self)Converts a viewport coordinate to a value of the specified data scale.
getViewPortAtValue(Self)Converts a value of the specified data scale to a viewport coordinate.
syncLinearAxisWithViewPort(Self)Synchronizes a linear Axis with the part of the data scale in viewport.
syncLogAxisWithViewPort(Self)Synchronizes a logarithmic Axis with the part of the data scale in viewport.
syncDateAxisWithViewPort(Self)Synchronizes a date/time Axis with the part of the data scale in viewport.
setMouseUsage(Self)Sets the mouse usage mode.
getMouseUsage(Self)Gets the mouse usage mode.
setZoomDirection(Self)Sets the zoom direction for mouse zoom in/out actions.
getZoomDirection(Self)Gets the zoom direction for mouse zoom in/out actions.
setScrollDirection(Self)Sets the scroll direction for mouse scroll actions.
getScrollDirection(Self)Gets the scroll direction for mouse scroll actions.
setZoomInRatio(Self)Sets the magnification ratio for each zoom in click of the mouse.
getZoomInRatio(Self)Gets the magnification ratio for each zoom in click of the mouse.
setZoomOutRatio(Self)Sets the magnification ratio for each zoom out click of the mouse.
getZoomOutRatio(Self)Gets the magnification ratio for each zoom out click of the mouse.
setMouseWheelZoomRatio(Self)Sets the magnification ratio for each mouse wheel event.
getMouseWheelZoomRatio(Self)Gets the magnification ratio for each mouse wheel event.
setZoomInWidthLimit(Self)Sets the viewport width at maximum zoom in.
getZoomInWidthLimit(Self)Gets the viewport width at maximum zoom in for mouse zoom in actions.
setZoomOutWidthLimit(Self)Sets the viewport width at maximum zoom out.
getZoomOutWidthLimit(Self)Gets the viewport width at maximum zoom out for mouse zoom out actions.
setZoomInHeightLimit(Self)Sets the viewport height at maximum zoom in.
getZoomInHeightLimit(Self)Gets the viewport height at maximum zoom in for mouse zoom in actions.
setZoomOutHeightLimit(Self)Sets the viewport height at maximum zoom out.
getZoomOutHeightLimit(Self)Gets the viewport height at maximum zoom out for mouse zoom out actions.
setMinimumDrag(Self)Sets the minimum mouse drag distance before it is considered as an intentional drag.
getMinimumDrag(Self)Gets the minimum mouse drag distance before it is considered as an intentional drag.
setSelectionBorderWidth(Self)Sets the border width of the zoom selection box.
getSelectionBorderWidth(Self)Gets the border width of the zoom selection box.
setSelectionBorderColor(Self)Sets the border color of the zoom selection box as a java.awt.Color.
getSelectionBorderColor(Self)Gets the border color of the zoom selection box.
setHotSpotCursor(Self)Sets the cursor that is displayed when the mouse cursor is over a normal hot spot.
getHotSpotCursor(Self)Gets the cursor that is displayed when the mouse cursor is over a normal hot spot.
setZoomInCursor(Self)Sets the mouse cursor to be used when the mouse is used for zoom in.
getZoomInCursor(Self)Gets the mouse cursor to be used when the mouse is used for zoom in.
setZoomOutCursor(Self)Sets the mouse cursor to be used when the mouse is used for zoom out.
getZoomOutCursor(Self)Gets the mouse cursor to be used when the mouse is used for zoom out.
setNoZoomCursor(Self)Sets the mouse cursor to be used when the mouse is used for zoom in/out, but the zoom in/out limits has been reached.
getNoZoomCursor(Self)Gets the mouse cursor to be used when the mouse is used for zoom in/out, but the zoom in/out limits has been reached.
setScrollCursor(Self)Sets the mouse cursor to be used when the mouse is used for scrolling.
getScrollCursor(Self)Gets the mouse cursor to be used when the mouse is used for scrolling.
setUpdateInterval(Self)Sets the minimum gap interval between two ViewPortChanged events in milliseconds.
getUpdateInterval(Self)Gets the minimum gap interval between two ViewPortChanged events in milliseconds.
addTrackCursorListener(Self)Adds the specified TrackCursorListener to receive track cursor related events.
removeTrackCursorListener(Self)Remove the specified TrackCursorListener so that it no longer receives track cursor related events.
addHotSpotListener(Self)Adds the specified HotSpotListener to receive hot spot mouse events.
removeHotSpotListener(Self)Remove the specified HotSpotListener so that it no longer receives hot spot mouse events.
addHotSpotMotionListener(Self)Adds the specified HotSpotMotionListener to receive hot spot mouse motion events.
removeHotSpotMotionListener(Self)Remove the specified HotSpotMotionListener so that it no longer receives hot spot mouse motion events.
addViewPortListener(Self)Adds the specified ViewPortListener to receive viewport events.
removeViewPortListener(Self)Remove the specified ViewPortListener so that it no longer receives viewport events.
processHotSpotEvent(Self)Process hot spot mouse events.
processHotSpotMotionEvent(Self)Process hot spot mouse motion events.
isMouseOnPlotArea(Self)Checks if the mouse cursor is on the extended plot area.
isMouseDragging(Self)Checks if the mouse is dragging on the plot area.
isInMouseMoveEvent(Self)Checks if the current code is executing in a TrackCursorListener.mouseMovedChart event or TrackCursorListener.mouseMovedPlotArea event handler.
isInViewPortChangedEvent(Self)Checks if the current code is executing in a ViewPortChanged event.
Note: Methods inherited from JLabel are omitted.