Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvChartView

IlvObject
   |
   +--IlvEmptyView
      |
      +--IlvResizableView
         |
         +--IlvAbstractView
            |
            +--IlvChartComponentView
               |
               +--IlvChartView

Category:
Charts component
JavaScript File:
IlvChartView.js
Description:
The IlvChartView is a component that displays an image obtained from a server. You must call the setServletURL() method to set the URL of the servlet. The class IlvInteractor allows you to implement some interaction on the view.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvChartView(left, top, width, height, reload, namespace)
Method Summary
Method Attributes Method Name and Description
 
Adds a listener to be called when the capabilities have been loaded.
 
Adds a listener to be called when an interactor has changed on the view
 
Creates the HTTP request for capabilities.
 
createImageRequestURL(width, height)
Creates the URL for the image request.
 
Disposes of all resources being used by the view.
 
Queries the server for the capabilities.
 
Returns an array of strings of available data sets on the server.
 
Returns the visible window.
 
Returns the legend associated with this chart.
 
Returns the maximum zoom level available on the server side.
 
Returns the plot area bounds.
 
Returns the pop-up menu on set this view.
 
Returns the automatic update interval of the view.
 
Returns the visible window.
 
Returns the visible range along the x-axis.
 
Returns the factor used when calling the zoomIn and zoomOut methods.
 
Returns the visible range along the y-axis.
 
Returns the factor used when calling the zoomIn and zoomOut methods.
 
This method is automatically invoked when the image has been loaded from the server.
 
init()
Initializes the view.
 
is3D()
Returns whether the chart is rendered in 3-D.
 
Returns whether the automatic update will also update the capabilities.
 
Returns whether the legend view is updated each time a new image is loaded.
 
Returns whether the capabilities have been loaded from the server.
 
Returns whether the chart uses a cartesian projector
 
Tells if the view is deleting its cookies on dispose
 
isInPlotRect(x, y)
Returns whether the specified point lies within the plot area.
 
Returns whether the chart axis have been swapped.
 
keyDown(e)
Handles Key down events.
 
Handles Key press events.
 
keyUp(e)
Handles Key up events.
 
Handles the 'down' events of the mouse.
 
Handles the 'drag' events of the mouse.
 
Handles the 'move' events of the mouse.
 
Handles the 'out' events of the mouse.
 
Handles the 'over' events of the mouse.
 
mouseUp(e)
Handles the 'up' events of the mouse.
 
This method is automatically invoked when the capabilities have been loaded from the server.
 
performAction(actionName, params, udpateImage)
Performs an action on the server side.
 
Reads additional information generated by the capabilities request.
 
Removes a listener installed with addCapabilitiesLoadListener.
 
Removes a listener installed with addInteractorListener.
 
Resets the visible range and data range.
 
Resets the timer that will invoke the session expiration handler.
 
Sets whether the automatic update will also update the capabilities.
 
setAutoUpdateLegend(autoUpdate)
Sets whether the legend view is updated each time a new image is loaded.
 
Tells the view should delete its cookie when the dispose function is called.
 
setLegend(legend)
Sets the legend associated with this chart.
 
setPopupMenu(popupMenu)
Sets the pop-up menu on this view.
 
Sets a listener that will be called when the HTTP session is about to be invalidated.
 
Changes the automatic update interval of the view.
 
setVisibleWindow(xMin, xMax, yMin, yMax)
Sets the visible window.
 
setXVisibleRange(newMin, newMax)
Sets the visible range along the x-axis and update the image.
 
setXZoomFactor(factor)
Changes the factor used when calling the zoomIn and zoomOut methods.
 
setYVisibleRange(newMin, newMax)
Sets the visible range along the y-axis and update the image.
 
setYZoomFactor(factor)
Changes the factor used when calling the zoomIn and zoomOut methods.
 
Starts the update timer.
 
Stops the update timer.
 
translateX(delta)
Translates the chart area along the x-axis.
 
translateY(delta)
Translates the chart area along the y-axis.
 
updateImage(updateCapabilities)
Queries a new image from the server.
 
zoomBy(xFactor, yFactor)
Zooms the view to a specified factor by querying a new image from the server.
 
Zooms the view along the x-axis in by querying a new image from the server.
 
Zooms the view along the y-axis in by querying a new image from the server.
 
Zooms the view out along the x-axis by querying a new image from the server.
 
Zooms the view out along the y-axis by querying a new image from the server.
 
Queries a new image showing all the data available from the server.
Methods inherited from class IlvChartComponentView
addErrorListener, addTimeoutErrorListener, createHitmapRequestURL, createImageMapRequestURL, getAgainParam, getBlendTransform, getComponent, getImageBackgroundColor, getImageFormat, getImageHeight, getImageScrollPosition, getImageWidth, getMessagePanel, getRectangle, getServletURL, getTimeoutErrorInterval, getWaitingImage, hideImageMap, imageMapUpdated, isGenerateImageMap, isImageMapVisible, removeErrorListener, removeTimeoutErrorListener, resetErrorHandler, setBlendTransform, setChildrenBounds, setComponent, setGenerateImageMap, setImageBackgroundColor, setImageFormat, setImageMapVisible, setImageScrollPosition, setMessagePanel, setServletURL, setTimeoutErrorInterval, setWaitingImage, showImageMap, startErrorTimer, stopErrorTimer, timeoutError, updateHitmap, updateImageMap
Methods inherited from class IlvAbstractView
childrenToHTML, getCursor, getGlassView, getHitInfos, getHitInfoTypes, getInteractor, putHitInfoType, setAccessible, setAdditionalParameters, setCursor, setHitmapLayers, setInteractor, setScrollBarSize, setScrollBarState
Methods inherited from class IlvResizableView
getMaximumSize, getMinimumSize, isResizable, setHotkeys, setMaximumSize, setMinimumSize, setResizable, toHTML
Methods inherited from class IlvEmptyView
addSizeListener, getBounds, getHeight, getLeft, getLocation, getSize, getTop, getWidth, isStateInCookie, removeSizeListener, restoreState, saveState, setBounds, setLocation, setSize, setStateInCookie
Methods inherited from class IlvObject
getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvChartView
IlvChartView(left, top, width, height, reload, namespace)
Parameters:
left - The x absolute position on page.
top - The y absolute position on page.
width - The width of the view.
height - The height of the view.
reload - An optional Boolean value that specifies whether the view should be initialized from a temporary cookie that persists for the current browser session. If omitted, the default value is false.
namespace - An optional parameter to place the view in a namespace. This is useful when using IlvViews in multiple browser windows, or in multiple frames of a frameset and the views must store cookies that should not conflict with each other. In this case, use the namespace to uniquely identify the views that belong to a specific browser window or frameset frame. For example, if you have created a new window with a unique name:

open(childPageURL, uniqueWindowName, ...);
you can then use the window name to define the namespace for views within the child page:

var view = new IlvXXXXView(..., window.name);
Method Detail
addCapabilitiesLoadListener
addCapabilitiesLoadListener(listener)
Adds a listener to be called when the capabilities have been loaded.
Parameters:
listener - The listener function, which must have the following parameters:
  view: The IlvChartView.

addInteractorListener
addInteractorListener(listener)
Adds a listener to be called when an interactor has changed on the view
Parameters:
listener - The listener function, which must have the following parameters:
  view: The IlvChartView.
  oldInteractor: The old interactor (IlvInteractor).
  newInteractor: The new interactor (IlvInteractor).

createCapabilitiesRequestURL
createCapabilitiesRequestURL()
Creates the HTTP request for capabilities.

createImageRequestURL
createImageRequestURL(width, height)
Creates the URL for the image request.
Parameters:
width - The width of the requested image.
height - The height of the requested image.

dispose
dispose()
Disposes of all resources being used by the view. Make sure to call IlvObject.callDispose() function on the onunload event of the page:
 <body onunload="IlvObject.callDispose()">

getCapabilities
getCapabilities()
Queries the server for the capabilities. When the capabilities are completely loaded into the view, the onCapabilitiesLoaded method is automatically invoked with the same parameter values.

getDataSets
getDataSets()
Returns an array of strings of available data sets on the server. The value is valid only when the capabilities have been loaded from the server.

getDataWindow
getDataWindow()
Returns the visible window. This method returns an object with four properties: xMin, xMax, yMin, yMax. This value is valid only when the capabilities have been loaded.

getLegend
getLegend()
Returns the legend associated with this chart.

getMaxZoomLevel
getMaxZoomLevel()
Returns the maximum zoom level available on the server side. The value is valid only when the capabilities of the server have been loaded.

getPlotRect
getPlotRect()
Returns the plot area bounds. This method returns an object with four properties: left, top, width, height. This value is valid only when the capabilities have been loaded.

getPopupMenu
getPopupMenu()
Returns the pop-up menu on set this view.
Since:
JViews 7.5
Returns:
the pop-up menu.

getUpdateInterval
getUpdateInterval()
Returns the automatic update interval of the view.

getVisibleWindow
getVisibleWindow()
Returns the visible window. This method returns an object with four properties: xMin, xMax, yMin, yMax. This value is valid only when the capabilities have been loaded.

getXVisibleRange
getXVisibleRange()
Returns the visible range along the x-axis. This method returns an object with two properties: min, max. This value is valid only when the capabilities have been loaded.

getXZoomFactor
getXZoomFactor()
Returns the factor used when calling the zoomIn and zoomOut methods.

getYVisibleRange
getYVisibleRange()
Returns the visible range along the y-axis. This method returns an object with two properties: min, max. This value is valid only when the capabilities have been loaded.

getYZoomFactor
getYZoomFactor()
Returns the factor used when calling the zoomIn and zoomOut methods.

imageLoaded
imageLoaded()
This method is automatically invoked when the image has been loaded from the server.

init
init()
Initializes the view. This method must be called on the onLoad event of the page containing the view.

is3D
is3D()
Returns whether the chart is rendered in 3-D.

isAutoUpdateCapabilities
isAutoUpdateCapabilities()
Returns whether the automatic update will also update the capabilities.

isAutoUpdateLegend
isAutoUpdateLegend()
Returns whether the legend view is updated each time a new image is loaded.

isCapabilitiesLoaded
isCapabilitiesLoaded()
Returns whether the capabilities have been loaded from the server.

isCartesian
isCartesian()
Returns whether the chart uses a cartesian projector

isDeletingCookieOnDispose
isDeletingCookieOnDispose()
Tells if the view is deleting its cookies on dispose
Since:
JViews 6.0

isInPlotRect
isInPlotRect(x, y)
Returns whether the specified point lies within the plot area.
Parameters:
x - The x-coordinate of the point.
y - The y-coordinate of the point.

isXHorizontal
isXHorizontal()
Returns whether the chart axis have been swapped. The value is valid only when the capabilities have been loaded from the server.

keyDown
keyDown(e)
Handles Key down events.
Parameters:
e - The key event with the following read-only properties:
 e.type:     a string representing the event type,
 e.keyCode:  the code of the key.

keyPress
keyPress(e)
Handles Key press events.
Parameters:
e - The key event with the following read-only properties:
 e.type:     a string representing the event type,
 e.keyCode:  the code of the key.

keyUp
keyUp(e)
Handles Key up events.
Parameters:
e - The key event with the following read-only properties:
 e.type:     a string representing the event type,
 e.keyCode:  the code of the key.

mouseDown
mouseDown(e)
Handles the 'down' events of the mouse.
Parameters:
e - The mouse event with 8 read-only properties:
 e.type:     a string representing the event type,
 e.mouseX:   the mouse coordinates relative to the view,
 e.mouseY:   the mouse coordinates relative to the view,
 e.screenX:  the absolute mouse coordinates in the screen,
 e.screenY:  the absolute mouse coordinates in the screen,
 e.altKey:   a Boolean, true when the ALT key is pressed,
 e.ctrlKey:  a Boolean, true when the CONTROL key is pressed,
 e.shiftKey: a Boolean, true when the SHIFT key is pressed.

mouseDrag
mouseDrag(e)
Handles the 'drag' events of the mouse.
Parameters:
e - The mouse event with 8 read-only properties:
 e.type:     a string representing the event type,
 e.mouseX:   the mouse coordinates relative to the view,
 e.mouseY:   the mouse coordinates relative to the view,
 e.screenX:  the absolute mouse coordinates in the screen,
 e.screenY:  the absolute mouse coordinates in the screen,
 e.altKey:   a Boolean, true when the ALT key is pressed,
 e.ctrlKey:  a Boolean, true when the CONTROL key is pressed,
 e.shiftKey: a Boolean, true when the SHIFT key is pressed.

mouseMove
mouseMove(e)
Handles the 'move' events of the mouse.
Parameters:
e - The mouse event with 8 read-only properties:
 e.type:     a string representing the event type,
 e.mouseX:   the mouse coordinates relative to the view,
 e.mouseY:   the mouse coordinates relative to the view,
 e.screenX:  the absolute mouse coordinates in the screen,
 e.screenY:  the absolute mouse coordinates in the screen,
 e.altKey:   a Boolean, true when the ALT key is pressed,
 e.ctrlKey:  a Boolean, true when the CONTROL key is pressed,
 e.shiftKey: a Boolean, true when the SHIFT key is pressed.

mouseOut
mouseOut(e)
Handles the 'out' events of the mouse.
Parameters:
e - The mouse event with 8 read-only properties:
 e.type:     a string representing the event type,
 e.mouseX:   the mouse coordinates relative to the view,
 e.mouseY:   the mouse coordinates relative to the view,
 e.screenX:  the absolute mouse coordinates in the screen,
 e.screenY:  the absolute mouse coordinates in the screen,
 e.altKey:   a Boolean, true when the ALT key is pressed,
 e.ctrlKey:  a Boolean, true when the CONTROL key is pressed,
 e.shiftKey: a Boolean, true when the SHIFT key is pressed.

mouseOver
mouseOver(e)
Handles the 'over' events of the mouse.
Parameters:
e - The mouse event with 8 read-only properties:
 e.type:     a string representing the event type,
 e.mouseX:   the mouse coordinates relative to the view,
 e.mouseY:   the mouse coordinates relative to the view,
 e.screenX:  the absolute mouse coordinates in the screen,
 e.screenY:  the absolute mouse coordinates in the screen,
 e.altKey:   a Boolean, true when the ALT key is pressed,
 e.ctrlKey:  a Boolean, true when the CONTROL key is pressed,
 e.shiftKey: a Boolean, true when the SHIFT key is pressed.

mouseUp
mouseUp(e)
Handles the 'up' events of the mouse.
Parameters:
e - The mouse event with 8 read-only properties:
 e.type:     a string representing the event type,
 e.mouseX:   the mouse coordinates relative to the view,
 e.mouseY:   the mouse coordinates relative to the view,
 e.screenX:  the absolute mouse coordinates in the screen,
 e.screenY:  the absolute mouse coordinates in the screen,
 e.altKey:   a Boolean, true when the ALT key is pressed,
 e.ctrlKey:  a Boolean, true when the CONTROL key is pressed,
 e.shiftKey: a Boolean, true when the SHIFT key is pressed.

onCapabilitiesLoaded
onCapabilitiesLoaded(context)
This method is automatically invoked when the capabilities have been loaded from the server.
Parameters:
context

performAction
performAction(actionName, params, udpateImage)
Performs an action on the server side. This method requests a new image from the server. Optionally, new capabilities can also be requested from the server before the image is retrieved. Additional parameters are sent in the request so that an action can be performed on the server side before the capabilities and image are generated. This allows you to define a new type of interaction on the image. To implement the action on the server side, you must implement the IlvChartServerAction interface and register the action with an instance of IlvChartServletSupport. An action is defined by a name and a list of parameters.
Parameters:
actionName - The name of the action.
params - The parameters of the action as an array of strings.
udpateImage - true to update capabilities and the image, false to update just the capabilities.

readAdditionalCapabilities
readAdditionalCapabilities(context)
Reads additional information generated by the capabilities request. This implementation does nothing. Subclasses should override this method to read additional variables generated by the server.
Parameters:
context - The object that contains the JavaScript variables generated by the server.

removeCapabilitiesLoadListener
removeCapabilitiesLoadListener(listener)
Removes a listener installed with addCapabilitiesLoadListener.
Parameters:
listener - The listener to remove.

removeInteractorListener
removeInteractorListener(listener)
Removes a listener installed with addInteractorListener.
Parameters:
listener - The listener to remove.

resetRange
resetRange()
Resets the visible range and data range. The corresponding ranges will be updated only when the capabilities have been reloaded.

resetSessionExpirationTimer
resetSessionExpirationTimer()
Resets the timer that will invoke the session expiration handler.
Since:
JViews 8.1
See also:
#setSessionExpirationHandler

setAutoUpdateCapabilities
setAutoUpdateCapabilities(set)
Sets whether the automatic update will also update the capabilities. The default value is true. Note that setting this property to false implies that all capabilites (including both axis data range and visible range) do not change between two updates.
Parameters:
set

setAutoUpdateLegend
setAutoUpdateLegend(autoUpdate)
Sets whether the legend view is updated each time a new image is loaded. The default value is false.
Parameters:
autoUpdate

setDeletingCookieOnDispose
setDeletingCookieOnDispose(del)
Tells the view should delete its cookie when the dispose function is called.
Parameters:
del
Since:
JViews 6.0

setLegend
setLegend(legend)
Sets the legend associated with this chart.
Parameters:
legend - An IlvLegendView instance.

setPopupMenu
setPopupMenu(popupMenu)
Sets the pop-up menu on this view.
Parameters:
popupMenu - the pop-up menu to set.
Since:
JViews 7.5

setSessionExpirationHandler
setSessionExpirationHandler(handler)
Sets a listener that will be called when the HTTP session is about to be invalidated.

This method works if and only if the session inactivity is reset by a JViews request. If the session inactivity is reset by an external request, the #resetSessionExpirationTimer method must be called.

This method must be called before the capabilities request is made.

Parameters:
handler - The session expiration handler. This must be a function with one parameter: the view.
Since:
JViews 8.1

setUpdateInterval
setUpdateInterval(rate)
Changes the automatic update interval of the view.
Parameters:
rate - The new interval in seconds. An interval of zero stops the automatic update.

setVisibleWindow
setVisibleWindow(xMin, xMax, yMin, yMax)
Sets the visible window.
Parameters:
xMin - The minimum value along x-axis.
xMax - The maximum value along x-axis.
yMin - The minimum value along y-axis.
yMax - The maximum value along y-axis.

setXVisibleRange
setXVisibleRange(newMin, newMax)
Sets the visible range along the x-axis and update the image.
Parameters:
newMin - The new minimum bound.
newMax - The new maximum bound.

setXZoomFactor
setXZoomFactor(factor)
Changes the factor used when calling the zoomIn and zoomOut methods. The default value is 2.
Parameters:
factor - The factor to set.

setYVisibleRange
setYVisibleRange(newMin, newMax)
Sets the visible range along the y-axis and update the image.
Parameters:
newMin - The new minimum bound.
newMax - The new maximum bound.

setYZoomFactor
setYZoomFactor(factor)
Changes the factor used when calling the zoomIn and zoomOut methods. The default value is 2.
Parameters:
factor

startUpdateTimer
startUpdateTimer()
Starts the update timer.

stopUpdateTimer
stopUpdateTimer()
Stops the update timer.

translateX
translateX(delta)
Translates the chart area along the x-axis.
Parameters:
delta - The delta to apply expressed as a float value.

translateY
translateY(delta)
Translates the chart area along the y-axis.
Parameters:
delta - The delta to apply expressed as a float value.

updateImage
updateImage(updateCapabilities)
Queries a new image from the server.
Parameters:
updateCapabilities - A Boolean value indicating whether the capabilities should be loaded.

zoomBy
zoomBy(xFactor, yFactor)
Zooms the view to a specified factor by querying a new image from the server.
Parameters:
xFactor - The zoom factor on the x-axis.
yFactor - The zoom factor on the y-axis.

zoomInX
zoomInX()
Zooms the view along the x-axis in by querying a new image from the server. The zoom factor is the one defined by means of the setXZoomFactor() method.

zoomInY
zoomInY()
Zooms the view along the y-axis in by querying a new image from the server. The zoom factor is the one defined by means of the setYZoomFactor() method.

zoomOutX
zoomOutX()
Zooms the view out along the x-axis by querying a new image from the server.

zoomOutY
zoomOutY()
Zooms the view out along the y-axis by querying a new image from the server.

zoomToFit
zoomToFit()
Queries a new image showing all the data available from the server.

©Copyright Rogue Wave Software Inc. 1997, 2018. All Rights Reserved.