Rogue Wave Views
Charts Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Protected Member Functions
IlvSingleChartDisplayer Class Referenceabstract

Base class for single displayers. More...

#include <ilviews/charts/display.h>

Inheritance diagram for IlvSingleChartDisplayer:
IlvAbstractChartDisplayer IlvValueInterface IlvBarChartDisplayer IlvBubbleChartDisplayer IlvFixedStepChartDisplayer IlvHiLoChartDisplayer IlvPieChartDisplayer IlvPolylineChartDisplayer IlvScatterChartDisplayer IlvStepChartDisplayer

Public Member Functions

virtual ~IlvSingleChartDisplayer ()
 Destructor. More...
 
virtual IlvChartDisplayerPointsallocDisplayerPoints () const
 Allocates and returns an IlvChartDisplayerPoints object. More...
 
virtual IlBoolean boundingBox (IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the graphical representation of data. More...
 
virtual IlBoolean dataPointBBox (IlUInt dataPtIdx, IlvRect &bbox, IlBoolean takeInfoIntoAccount=IlTrue, const IlvTransformer *t=0) const
 Returns the bounding box of the graphical representation of the data points at a given index. More...
 
virtual void draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the graphical representation of data. More...
 
virtual void drawDataPoint (IlUInt dataPtIdx, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the graphical representation of the data point(s) at a given index. More...
 
virtual void drawDataPoints (IlUInt iMin, IlUInt iMax, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the graphical representation of the data points between a given interval. More...
 
virtual void drawFill (IlBoolean b)
 Sets the filling mode of the displayer. More...
 
virtual void drawLegendItem (IlvPort *dst, const IlvRect &legendArea, IlvPalette *itemPal, const IlvRegion *clip, IlAny clientData=0) const
 Draws the graphic part of a legend item associated with the current displayer. More...
 
virtual IlvColorgetBackground (IlUInt index=0) const
 Returns the background color of a palette used by the current displayer to display data. More...
 
virtual void getClipArea (IlvRect &area, const IlvTransformer *t) const
 Returns the clipping region that is used for the drawing. More...
 
void getDataDisplayArea (IlvRect &dataDisplayArea, const IlvTransformer *t=0) const
 Returns the bounds of the data display area. More...
 
IlvChartDisplayerPointsFactorygetDisplayerPointsFactory () const
 Returns the factory used to create IlvChartDisplayerPoints instances. More...
 
virtual IlUInt getDisplayersCount () const
 Returns the number of displayers. More...
 
virtual IlUInt getDisplayItem (IlvChartDataSet *&dataSet, const IlvPoint &viewPoint, const IlvTransformer *t) const
 Returns the item to which a view point corresponds. More...
 
virtual IlBoolean getDisplayPoint (const IlvChartDataSet *dataSet, IlUInt dataPtIdx, IlvPoint &point, const IlvTransformer *t=0) const
 Returns the corresponding screen point for a data point. More...
 
virtual IlvColorgetForeground (IlUInt index=0) const
 Returns the foreground color of a palette used by the current displayer to display data. More...
 
virtual const char * getInternalLegendText (IlUInt index=0) const
 Returns the legend text stored in the current displayer. More...
 
virtual const char * getLegendText (IlUInt index=0) const
 Returns the text that will be used in a legend for the current displayer. More...
 
virtual IlUInt getNearestPoint (IlvChartDataSet *&dataSet, const IlvPoint &viewPoint, IlvDim distance, IlvPoint &point, const IlvTransformer *t=0) const
 Returns the nearest data point. More...
 
virtual IlvPalettegetPalette (IlUInt=0) const
 Returns a palette used by the current displayer to display data. More...
 
virtual IlvPointInfoCollectiongetPointInfoCollection (const IlvChartDataSet *dataSet) const
 Returns the point information collection defined to be used to display a given data set. More...
 
IlvPos getShiftOffset () const
 Returns the offset by which the graphical representation of data is shifted along the base of the chart. More...
 
virtual IlvDim getSizeAlongBase () const
 Returns the size along the base for the graphical representation of a given data point. More...
 
IlBoolean isDrawingFill () const
 Returns the filling mode for the current displayer. More...
 
virtual void releaseDisplayerPoints (IlvChartDisplayerPoints *dispPts) const
 Releases an IlvChartDisplayerPoints object used by the current displayer. More...
 
virtual void setBackground (IlvColor *color, IlUInt index=0)
 Sets the background color of a palette used by the current displayer to display data. More...
 
virtual IlBoolean setDataPoint (IlvChartDataSet *dataSet, IlUInt dataPtIdx, const IlvPoint &point, const IlvTransformer *t=0) const
 Sets the corresponding data point from a screen point. More...
 
IlvChartDisplayerPointsFactorysetDisplayerPointsFactory (IlvChartDisplayerPointsFactory *factory)
 Sets the factory used to create IlvChartDisplayerPoints instances. More...
 
virtual void setForeground (IlvColor *color, IlUInt index=0)
 Sets the foreground color of a palette used by the current displayer to display data. More...
 
virtual void setLegendItems (IlvChartLegend *legend) const
 Sets the legend items associated with the current displayer. More...
 
virtual void setLegendText (const char *text, IlUInt index=0)
 Sets the text that will be used in a legend for the current displayer. More...
 
virtual void setMode (IlvDrawMode mode)
 Sets the drawing mode. More...
 
virtual void setOverwrite (IlBoolean o)
 Sets the overwrite mode. More...
 
virtual void setPalette (IlvPalette *pal, IlUInt index=0)
 Sets a palette used by the current displayer to display data. More...
 
virtual void setPointInfoCollection (const IlvChartDataSet *dataSet, IlvPointInfoCollection *ptInfoCollection)
 Sets the point information collection that will be used to display a given data set. More...
 
void setShiftOffset (IlvPos offset)
 Sets the offset by which the graphical representation of data is shifted along the base of the chart. More...
 
virtual void treatPointsOutOfAbscissaLimits (const IlvRect &dataDisplayArea, IlvChartDisplayerPoints *displayerPoints, const IlvCoordInterval &abscissaRange, const IlvPoint &minLimit, const IlvPoint &maxLimit) const
 Treats the occurrence of points in screen coordinates that are outside the abscissa limits. More...
 
virtual IlBoolean usePointInfo () const
 Indicates whether point information collections are defined. More...
 
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file. More...
 
- Public Member Functions inherited from IlvAbstractChartDisplayer
virtual ~IlvAbstractChartDisplayer ()
 Destructor. More...
 
void addDataSet (IlvChartDataSet *dataSet)
 Adds a real data set to be displayed by the current displayer. More...
 
virtual IlBoolean canBeProjectedIfOutOfBounds () const
 Indicates whether the graphical representation can be projected when it is out-of-bounds. More...
 
virtual IlvAbstractChartDisplayercopy () const =0
 Virtual copy constructor. More...
 
IlBoolean dataPointToDisplay (const IlvDoublePoint &dataPoint, IlvPoint &point, const IlvTransformer *t=0) const
 Projects a data point into screen coordinates. More...
 
virtual IlBoolean displayDataSet (const IlvChartDataSet *dataSet) const
 Indicates whether the current displayer displays a data set. More...
 
IlBoolean displayToDataPoint (const IlvPoint &point, IlvDoublePoint &dataPoint, const IlvTransformer *t=0) const
 Inversely projects a screen point to retrieve the corresponding data point. More...
 
IlvChartGraphicgetChartGraphic () const
 Returns the chart graphic which uses the current displayer. More...
 
IlvChartDataSetgetDataSet (IlUInt index=0) const
 Returns a data set used by the current displayer. More...
 
IlUInt getDataSetsCount () const
 Returns the number of data sets used by the current displayer. More...
 
IlUInt getMaxDataSetsCount () const
 Returns the maximum number of real data sets that the current displayer is allowed to display. More...
 
const char * getName () const
 Returns the name of the current displayer. More...
 
IlvCoordinateInfogetOrdinateInfo () const
 Deprecated Returns the coordinate information associated with the ordinate scale considered to display data. More...
 
const IlvCompositeChartDisplayergetParentDisplayer () const
 Returns the parent displayer. More...
 
virtual IlvChartDataPointInfogetPointInfo (IlUInt dataPtIdx, const IlvChartDataSet *dataSet=0) const
 Returns the point information associated with a given data point. More...
 
virtual IlvPalettegetProjectedPointsPalette () const
 Returns the palette used to display out-of-bounds values. More...
 
IlvChartDataSetgetRealDataSet (IlUInt index=0) const
 Returns a real data set to be displayed by the current displayer. More...
 
IlUInt getRealDataSetsCount () const
 Returns the number of real data sets. More...
 
virtual IlvCombinedChartDataSetgetVirtualDataSet (const IlvChartDataSet *dataSet, IlUInt &index) const
 Returns a virtual data set used by the current displayer. More...
 
virtual IlBoolean graphicalRepresentationByDataPoint () const
 Indicates whether there is a graphical representation by data point. More...
 
virtual void insertDataSet (IlvChartDataSet *dataSet, IlUInt index=IlvLastPositionIndex)
 Inserts a real data set to be displayed by the current displayer. More...
 
virtual IlBoolean isContinuous () const
 Indicates whether the graphical representation is continuous. More...
 
virtual IlBoolean isFilled () const
 Indicates whether the graphical representation is filled. More...
 
virtual IlBoolean isViewable () const
 Indicates whether the graphical representation can be viewed. More...
 
IlBoolean isVisible () const
 Indicates whether the graphical representation is visible. More...
 
virtual void removeDataSet (IlvChartDataSet *dataSet)
 Removes a real data set from the data sets to be displayed by the current displayer. More...
 
virtual void removeDataSets ()
 Removes all the real data sets to be displayed by the current displayer.
 
void removePointInfoCollection (const IlvChartDataSet *dataSet)
 Removes the point information collection defined to be used to display a given data set. More...
 
virtual IlBoolean replaceDataSet (IlvChartDataSet *oldDataSet, IlvChartDataSet *newDataSet)
 Replaces a real data set with another one. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
virtual void setChartGraphic (IlvChartGraphic *chart)
 Sets the chart graphic which uses the current displayer. More...
 
virtual void setDataSet (IlvChartDataSet *dataSet, IlUInt index=0)
 Sets a real data set to be displayed by the current displayer. More...
 
void setDataSet (IlvChartDataSet *dataSet, IlvPalette *palette, IlUInt index=0)
 Sets a real data set to be displayed by the current displayer. More...
 
virtual void setDataSets (IlUInt count, IlvChartDataSet *const *dataSets)
 Sets the real data sets to be displayed by the current displayer. More...
 
void setName (const char *name)
 Sets the name of the current displayer. More...
 
virtual void setOrdinateInfo (IlvCoordinateInfo *ordinateInfo)
 Sets the coordinate information associated with the ordinate scale considered to display data. More...
 
void setParentDisplayer (const IlvCompositeChartDisplayer *displayer)
 Sets the parent displayer. More...
 
void setVirtualDataSet (IlvCombinedChartDataSet *vDataSet, IlUInt index=0)
 Sets a virtual data set used by the current displayer. More...
 
void setVisible (IlBoolean visible)
 Specifies whether the graphical representation is visible. More...
 
virtual IlBoolean useVirtualDataSets () const
 Indicates whether the current displayer uses virtual data sets. More...
 

Protected Member Functions

 IlvSingleChartDisplayer (IlvPalette *palette=0)
 Constructor. More...
 
 IlvSingleChartDisplayer (IlvInputFile &file)
 Constructor. More...
 
 IlvSingleChartDisplayer (const IlvSingleChartDisplayer &displayer)
 Constructor. More...
 
virtual void boundingBoxOfItem (const IlvChartDisplayerPoints *displayerPoints, IlUInt pointIndex, IlUInt pointsCount, IlvPoint *points, IlvRect &bbox, IlBoolean takeInfoIntoAccount=IlTrue, const IlvTransformer *t=0) const
 Returns the bounding box of the item drawn for a given point in screen coordinates corresponding to a data point to display. More...
 
IlBoolean boundingBoxOfPart (const IlvCoordInterval &abscissaRange, IlBoolean shiftOfCycleLength, IlvRect &partBBox, IlBoolean takeInfoIntoAccount, const IlvTransformer *t=0) const
 Returns the bounding box of a part of the graphical representation of data. More...
 
virtual void boundingBoxOfPoints (IlvChartDisplayerPoints *displayerPoints, IlvRect &bbox, IlBoolean takeInfoIntoAccount=IlTrue, const IlvTransformer *t=0) const
 Returns the bounding box of the graphical representation of projected points. More...
 
virtual void computeItem (const IlvChartDisplayerPoints *displayerPoints, IlUInt pointIndex, IlUInt &usedPointsCount, IlvPoint *points, const IlvTransformer *t=0) const =0
 Computes the item that will be displayed for a given point in screen coordinates corresponding to a data point to display. More...
 
virtual IlBoolean computeLimitsForDataSelection (const IlvRect &clipRect, const IlvCoordInterval &abscissaRange, const IlvCoordInterval &ordinateRange, IlvCoordInterval &abscissaSelectionRange, IlvCoordInterval &ordinateSelectionRange, IlBoolean &dataToSelect, const IlvTransformer *t=0) const
 Computes the abscissa and ordinate intervals used to select the data to be displayed in a given rectangle. More...
 
virtual void drawItem (const IlvChartDisplayerPoints *displayerPoints, IlUInt pointIndex, IlUInt pointsCount, IlvPoint *points, IlvPalette *itemPalette, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const =0
 Draws the item for a given point in screen coordinates corresponding to a data point to display. More...
 
void drawPart (const IlvCoordInterval &abscissaRange, IlBoolean shiftOfCycleLength, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws a part of the graphical representation of data. More...
 
virtual void drawPointInfos (const IlvChartDisplayerPoints *displayerPoints, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0, const IlvChartDataSet *dataSet=0) const
 Draws the point information defined for the data points to be displayed. More...
 
virtual void drawPoints (IlvChartDisplayerPoints *displayerPoints, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the graphical representation from points in screen coordinates corresponding to the data points to display. More...
 
virtual IlUInt getItemPointsCount (const IlvChartDisplayerPoints *displayerPoints) const
 Returns the maximum number of points needed to define an item for the current displayer. More...
 
IlUInt getNearestPointInsidePart (const IlvCoordInterval &abscissaRange, IlBoolean shiftOfCycleLength, IlvChartDataSet *&dataSet, const IlvPoint &viewPoint, IlvDim distance, IlvPoint &point, const IlvTransformer *t=0) const
 Returns the nearest data point within a given abscissa range. More...
 
virtual IlUInt pointsContains (const IlvPoint &viewPoint, IlvChartDisplayerPoints *, const IlvTransformer *t=0) const
 Returns the index of the data point of which the corresponding displayer item holds viewPoint.
 
virtual IlvDoublePointselectDataPointsForPoint (IlUInt dataPtIdx, IlUInt &count, IlUInt *&dataPtIdxes) const
 Selects and returns the data points needed to be able to display the graphical representation of the data point(s) at a given index in the real data set(s) to be displayed by the current displayer. More...
 
virtual IlvDoublePointselectDataPointsForRange (const IlvCoordInterval &abscissaRange, IlUInt &pointCount, IlUInt *&dataPtIdxes, const IlvTransformer *t=0, const IlvRect *clip=0) const
 Selects And returns the data points to display that are within a given abscissa interval. More...
 
virtual IlvDoublePointselectDataPointsInRect (IlUInt &pointCount, IlUInt *&dataPtIndexes, IlvRect pickRect, const IlvTransformer *t=0) const
 Selects the data points that are rendered within a rectangle. More...
 
- Protected Member Functions inherited from IlvAbstractChartDisplayer
 IlvAbstractChartDisplayer ()
 Constructor. More...
 
 IlvAbstractChartDisplayer (const IlvAbstractChartDisplayer &displayer)
 Constructor. More...
 
 IlvAbstractChartDisplayer (IlvInputFile &file)
 Constructor. More...
 
virtual void dataSetAdded (IlUInt position=IlvLastPositionIndex)
 Performs the updates needed when a real data set is added. More...
 
virtual void dataSetRemoved (IlUInt index)
 Performs the updates needed when a real data set is removed. More...
 
virtual void update ()
 Performs the updates needed when modifications (removing, adding, replacing) are made to the real data sets.
 
virtual void updateVirtualDataSets ()
 Updates the virtual data sets. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvAbstractChartDisplayer
static IlvAbstractChartDisplayerLoad (IlvInputFile &file)
 Reads a displayer object from a file. More...
 

Detailed Description

Base class for single displayers.

Library: ilvcharts

This class is an abstract subclass of IlvAbstractChartDisplayer that defines single displayers that display data with a single basic rendering shape. Examples of single displayers are displayers representing data with markers, polylines, bars, and so on.

See also
IlvAbstractChartDisplayer, IlvBarChartDisplayer, IlvBubbleChartDisplayer, IlvHiLoChartDisplayer, IlvPieChartDisplayer, IlvPolylineChartDisplayer, IlvStepChartDisplayer, IlvScatterChartDisplayer, IlvChartDisplayerPoints.

Constructor & Destructor Documentation

virtual IlvSingleChartDisplayer::~IlvSingleChartDisplayer ( )
virtual

Destructor.

The destructor removes all the data sets in the collection of data sets that will be displayed by the current displayer, deletes the text defined to be used in a legend for the current displayer, and unlocks the palette used by the current displayer.

IlvSingleChartDisplayer::IlvSingleChartDisplayer ( IlvPalette palette = 0)
protected

Constructor.

Initializes a new IlvSingleChartDisplayer instance. The shift offset and the text that will be used in a legend for the current displayer are set to 0 by default.

Parameters
paletteThe palette used by the current displayer to display data.
IlvSingleChartDisplayer::IlvSingleChartDisplayer ( IlvInputFile file)
protected

Constructor.

Initializes a new IlvSingleChartDisplayer instance from the description read in the input file named file.

Parameters
fileThe file used to initialize the current displayer.
IlvSingleChartDisplayer::IlvSingleChartDisplayer ( const IlvSingleChartDisplayer displayer)
protected

Constructor.

Initializes a new IlvSingleChartDisplayer instance as a copy of displayer.

Parameters
displayerThe object used to initialize the current one.

Member Function Documentation

virtual IlvChartDisplayerPoints* IlvSingleChartDisplayer::allocDisplayerPoints ( ) const
virtual

Allocates and returns an IlvChartDisplayerPoints object.

Allocates and returns the IlvChartDisplayerPoints object that will be used by the current displayer to project and render data. If a factory is associated with the current displayer, the IlvChartDisplayerPointsFactory::create() method is used. If no factory is defined, an instance of the IlvChartDisplayerPoints class is returned.

Returns
A pointer to the allocated IlvChartDisplayerPoints object.
See also
releaseDisplayerPoints().
virtual IlBoolean IlvSingleChartDisplayer::boundingBox ( IlvRect bbox,
const IlvTransformer t = 0 
) const
virtual

Returns the bounding box of the graphical representation of data.

Parameters
bboxThe bounding box of the graphical representation of data displayed by the current displayer.
tThe transformer that is applied to the returned bounding box.
Returns
IlTrue if the bounding box has been successfully computed and IlFalse otherwise.

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::boundingBoxOfItem ( const IlvChartDisplayerPoints displayerPoints,
IlUInt  pointIndex,
IlUInt  pointsCount,
IlvPoint points,
IlvRect bbox,
IlBoolean  takeInfoIntoAccount = IlTrue,
const IlvTransformer t = 0 
) const
protectedvirtual

Returns the bounding box of the item drawn for a given point in screen coordinates corresponding to a data point to display.

The item drawn for a given screen point corresponding to a data point to display depends on the type of the displayer. For example, for a displayer that displays data with 3D bars, the item is a 3D bar extending from this screen point to the abscissa scale.

Note
The points defining the item are computed by using the IlvSingleChartDisplayer::computeItem() method. (See this method for more details.)
Parameters
displayerPointsThe object that stores the points in screen coordinates that have to be displayed by the current displayer.
pointIndexThe index of the point in screen coordinates corresponding to a data point to display for which we want to compute the bounding box of the corresponding item.
pointsCountThe number of points defining the item.
pointsThe points defining the item for which we want to compute the bounding box.
bboxThe bounding box of the item. The returned bounding box is transformed by t.
takeInfoIntoAccountIndicates whether the point information must be taken into account for computing the bounding box.
tThe optional transformer.

Reimplemented in IlvPieChartDisplayer, IlvBubbleChartDisplayer, and IlvScatterChartDisplayer.

IlBoolean IlvSingleChartDisplayer::boundingBoxOfPart ( const IlvCoordInterval abscissaRange,
IlBoolean  shiftOfCycleLength,
IlvRect partBBox,
IlBoolean  takeInfoIntoAccount,
const IlvTransformer t = 0 
) const
protected

Returns the bounding box of a part of the graphical representation of data.

Computes the bounding box of the graphical representation of the data that are within the abscissa interval defined by abscissaRange and returns it in partBBox.

Parameters
abscissaRangeThe abscissa interval used to select the data for which the bounding box is computed.
shiftOfCycleLengthA Boolean value indicating whether the data are shifted by the cycle length before being displayed.
takeInfoIntoAccountA Boolean value indicating whether the point information must be taken into account for computing the bounding box.
partBBoxThe returned bounding box of the graphical representation of the data that are within the abscissa interval abscissaRange.
tThe transformer that is applied to the returned bounding box.
Returns
IlTrue if the bounding box has been successfully computed and IlFalse otherwise.
Note
This method is used inside the IlvSingleChartDisplayer::boundingBox() method. Since the graphical representation is drawn by parts (see the IlvSingleChartDisplayer::drawPart() method), the bounding box of the graphical representation of data is also computed by parts. Two parts are considered if the chart that uses the current displayer to display data is in cyclic mode (see the IlvChartGraphic::isInCyclicMode() method). One part is for data that have not been shifted by the cycle length before being displayed, and the other part is for data that have been shifted by the cycle length before being displayed. (See the IlvCoordinateInfo::getFirstCycleRange() and IlvCoordinateInfo::getSecondCycleRange() methods for more details.) Otherwise, only one part is considered.
virtual void IlvSingleChartDisplayer::boundingBoxOfPoints ( IlvChartDisplayerPoints displayerPoints,
IlvRect bbox,
IlBoolean  takeInfoIntoAccount = IlTrue,
const IlvTransformer t = 0 
) const
protectedvirtual

Returns the bounding box of the graphical representation of projected points.

Computes the bounding box of the graphical representation from the points expressed in screen coordinates that correspond to the data points to be displayed by the current displayer and returns it in bbox.

At this level of the class hierarchy, the method returns in bbox the bounding box of the points stored in displayerPoints and of the defined point information objects (if any and if the Boolean takeInfoIntoAccount is equal to IlTrue).

Parameters
displayerPointsThe object that stores the points in screen coordinates that have to be displayed by the current displayer. These points are considered to be already transformed by t.
bboxThe bounding box of the graphical representation computed from the points in screen coordinates corresponding to the data to display. This returned bounding box is transformed by t.
takeInfoIntoAccountA Boolean value indicating whether the point information must be taken into account for computing the bounding box.
tThe optional transformer.

Reimplemented in IlvStairChartDisplayer, IlvFixedStepChartDisplayer, IlvPieChartDisplayer, IlvStepChartDisplayer, IlvPolygonChartDisplayer, Ilv3dBarChartDisplayer, IlvHiLoChartDisplayer, IlvBubbleChartDisplayer, IlvBarChartDisplayer, and IlvScatterChartDisplayer.

virtual void IlvSingleChartDisplayer::computeItem ( const IlvChartDisplayerPoints displayerPoints,
IlUInt  pointIndex,
IlUInt usedPointsCount,
IlvPoint points,
const IlvTransformer t = 0 
) const
protectedpure virtual

Computes the item that will be displayed for a given point in screen coordinates corresponding to a data point to display.

The item that will be displayed for a given screen point corresponding to a data point to display depends on the type of the displayer.

For example, for a displayer that displays data with 3D bars, the item that will be displayed for a given screen point corresponding to a data point to display is a 3D bar extending from this screen point to the abscissa scale.

The item that must be drawn is defined by twelve points corresponding to the corners of the three faces of the 3D bar that will be displayed.

Note
The memory that has been allocated for the returned points points defining the item must be sufficient to store the maximum number of points needed to define an item that is returned by the IlvSingleChartDisplayer::getItemPointsCount() method.
Parameters
displayerPointsThe object that stores the points in screen coordinates that have to be displayed by the current displayer. These points are considered to be already transformed by t.
pointIndexThe index of the point stored in displayerPoints for which we want to compute the corresponding item to display with the current displayer.
usedPointsCountThe number of computed points defining the item.
pointsThe points defining the item. These points are transformed by t.
tThe transformer (if any) that is applied to the computed points.

Implemented in IlvStairChartDisplayer, IlvFixedStepChartDisplayer, IlvPieChartDisplayer, IlvStepChartDisplayer, IlvHiLoBarChartDisplayer, Ilv3dBarChartDisplayer, IlvHiLoChartDisplayer, IlvBubbleChartDisplayer, IlvPolylineChartDisplayer, IlvBarChartDisplayer, and IlvScatterChartDisplayer.

virtual IlBoolean IlvSingleChartDisplayer::computeLimitsForDataSelection ( const IlvRect clipRect,
const IlvCoordInterval abscissaRange,
const IlvCoordInterval ordinateRange,
IlvCoordInterval abscissaSelectionRange,
IlvCoordInterval ordinateSelectionRange,
IlBoolean dataToSelect,
const IlvTransformer t = 0 
) const
protectedvirtual

Computes the abscissa and ordinate intervals used to select the data to be displayed in a given rectangle.

Given the abscissa and ordinate intervals for all the data points displayed by the current displayer, this method computes the abscissa and ordinate intervals for the data points that will be displayed in the rectangle clipRect. These computed intervals will allow the data points that are needed to draw the part of the graphical representation that appears in the rectangle clipRect to be selected later.

Parameters
clipRectThe rectangle for which we want to compute the abscissa and ordinate intervals of the data points that are displayed inside this rectangle.
abscissaRangeThe abscissa interval of all the data points displayed by the current displayer.
ordinateRangeThe ordinate interval of all the data points displayed by the current displayer.
abscissaSelectionRangeThis parameter is used to return the abscissa interval of the data points that will be displayed in the rectangle clipRect.
ordinateSelectionRangeThis parameter is used to return the ordinate interval of the data points that will be displayed in the rectangle clipRect.
dataToSelectThis parameter is used to return a Boolean value indicating whether there will be some data to select (that is, there will be some data points that will be displayed in the rectangle clipRect).
tThe transformer (if any) that has been applied to clipRect.
Returns
IlTrue if the intervals computation has been successfully performed and IlFalse otherwise.
virtual IlBoolean IlvSingleChartDisplayer::dataPointBBox ( IlUInt  dataPtIdx,
IlvRect bbox,
IlBoolean  takeInfoIntoAccount = IlTrue,
const IlvTransformer t = 0 
) const
virtual

Returns the bounding box of the graphical representation of the data points at a given index.

Parameters
dataPtIdxThe index of the data point(s) for which we want to get the bounding box of their graphical representation.
bboxThe returned bounding box of the graphical representation of the data point(s).
takeInfoIntoAccountA Boolean value indicating whether the point information must be taken into account when the bounding box is computed.
tThe transformer that is applied to the bounding box.
Returns
IlTrue if the bounding box has been successfully computed and IlFalse otherwise.

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::draw ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the graphical representation of data.

Draws the graphical representation of data in the given IlvPort dst using the transformer t and the clipping region clip. In the case of a composite displayer, the draw() method is called for each child displayer that composes the composite displayer.

Parameters
dstThe port used for the drawing.
tThe optional transformer.
clipThe optional clipping region.

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::drawDataPoint ( IlUInt  dataPtIdx,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the graphical representation of the data point(s) at a given index.

Draws the graphical representation of the data point(s) at the index dataPtIdx in the data set(s) to be displayed by the current displayer. The drawing is performed in the port dst using the transformer t, and the clipping region clip.

Parameters
dataPtIdxThe index of the data point(s) to draw.
dstThe port used for the drawing.
tThe optional transformer.
clipThe optional clipping region.

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::drawDataPoints ( IlUInt  iMin,
IlUInt  iMax,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the graphical representation of the data points between a given interval.

Draws the graphical representation of the data points between the indexes iMin and iMax in the data set(s) to be displayed by the current displayer. The drawing is performed in the port dst using the transformer t and the clipping region clip.

Parameters
iMinThe minimum index used to select the data points to draw.
iMaxThe maximum index used to select the data points to draw.
dstThe port used for the drawing.
tThe optional transformer.
clipThe optional clipping region.
Note
For handling the needs of chart drawing, iMin is decreased by 1 and iMax is increased by 1 before selecting the data points whenever possible. This ensures continuity when drawing the chart, especially when polylines are used.
Warning
This method is simplified for performance reasons and does not work if the data have to be shifted by the cycle length before being displayed. If the data must be shifted, you have to use the IlvAbstractChartDisplayer::drawDataPoint() method, which works for all cases.

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::drawFill ( IlBoolean  b)
virtual

Sets the filling mode of the displayer.

This method tells the displayer whether the shape to render must be filled (using the background color of the palette) or simply outlined. In the case of a composite displayer, the new mode is propagated to all the child displayers.

Parameters
bThe new value of the Boolean indicating if the shape is to be filled (IlTrue) or only outlined (IlFalse).

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::drawItem ( const IlvChartDisplayerPoints displayerPoints,
IlUInt  pointIndex,
IlUInt  pointsCount,
IlvPoint points,
IlvPalette itemPalette,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
protectedpure virtual

Draws the item for a given point in screen coordinates corresponding to a data point to display.

The item that is drawn for a given screen point corresponding to a data point to display depends on the type of the displayer. For example, for a displayer that displays data with 3D bars, the item is a 3D bar extending from this screen point to the abscissa scale.

The drawing is performed in the port dst using the transformer t and the clipping region clip.

Note
The points defining the item points are computed by using the IlvSingleChartDisplayer::computeItem() method. (See this method for more details.)
Parameters
displayerPointsThe object that stores the points in screen coordinates that have to be displayed by the current displayer.
pointIndexThe index of the point in screen coordinates corresponding to a data point to display for which we want to draw the corresponding item.
pointsCountThe number of points defining the item to draw.
pointsThe points defining the item to draw.
itemPaletteThe palette used to draw the item.
dstThe port used for the drawing.
tThe optional transformer.
clipThe optional clipping region.

Implemented in IlvStairChartDisplayer, IlvFixedStepChartDisplayer, IlvPieChartDisplayer, IlvStepChartDisplayer, IlvHiLoBarChartDisplayer, Ilv3dBarChartDisplayer, IlvHiLoChartDisplayer, IlvPolygonChartDisplayer, IlvBubbleChartDisplayer, IlvPolylineChartDisplayer, IlvBarChartDisplayer, and IlvScatterChartDisplayer.

virtual void IlvSingleChartDisplayer::drawLegendItem ( IlvPort dst,
const IlvRect legendArea,
IlvPalette itemPal,
const IlvRegion clip,
IlAny  clientData = 0 
) const
virtual

Draws the graphic part of a legend item associated with the current displayer.

The drawing is performed in the port dst using the clipping region clip. It is bounded by the rectangle legendArea.

The current implementation of the method simply draws a rectangle on the limits of legendArea with the foreground color of the palette defined for the current displayer and fills this rectangle with the background color of this palette.

Parameters
dstThe port used for the drawing.
legendAreaThe area where the drawing is performed.
itemPalThe palette of the legend item associated with the current displayer.
clipThe optional clipping region.
clientDataThe client data defined for the legend item associated with the current displayer.

Implements IlvAbstractChartDisplayer.

Reimplemented in IlvStairChartDisplayer, IlvFixedStepChartDisplayer, IlvHiLoBarChartDisplayer, IlvPieChartDisplayer, IlvStepChartDisplayer, IlvPolygonChartDisplayer, IlvHiLoChartDisplayer, IlvBubbleChartDisplayer, IlvPolylineChartDisplayer, and IlvScatterChartDisplayer.

void IlvSingleChartDisplayer::drawPart ( const IlvCoordInterval abscissaRange,
IlBoolean  shiftOfCycleLength,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
protected

Draws a part of the graphical representation of data.

Draws the graphical representation of the data that are within the abscissa interval defined by abscissaRange. shiftOfCycleLength indicates whether the data must be shifted by the cycle length before being displayed. The drawing is performed in the given port dst using the transformer t and the clipping region clip.

Parameters
abscissaRangeThe abscissa interval used to select the data to display.
shiftOfCycleLengthA Boolean value indicating whether the data must be shifted by the cycle length before being displayed.
dstThe port used for the drawing.
tThe optional transformer.
clipThe optional clipping region.
Note
This method is used inside the IlvSingleChartDisplayer::draw() method to draw the graphical representation by parts. If the chart that uses the current displayer to display data is in a cyclic mode (see the IlvChartGraphic::isInCyclicMode() method), the graphical representation is displayed in two parts. One part displays data without shifting the data by the cycle length. The other part displays the data by shifting the data by the cycle length. (See the IlvCoordinateInfo::getFirstCycleRange() and IlvCoordinateInfo::getSecondCycleRange() methods for more details.) Otherwise, the graphical representation is displayed in one part.
virtual void IlvSingleChartDisplayer::drawPointInfos ( const IlvChartDisplayerPoints displayerPoints,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0,
const IlvChartDataSet dataSet = 0 
) const
protectedvirtual

Draws the point information defined for the data points to be displayed.

Draws the point information defined for the data points to be displayed by the current displayer, using the points expressed in screen coordinates that correspond to these data points. The drawing is performed in the given port dst using the transformer t and the clipping region clip by calling the IlvChartDataPointInfo::draw() method on all the point information defined for the data points to display.

Parameters
displayerPointsThe object that stores the points in screen coordinates that have to be displayed by the current displayer. These points are considered to be already transformed by t.
dstThe port used for the drawing.
tThe optional transformer.
clipThe optional clipping region.
dataSetThe data set associated with the projected data points. If this parameter is set to 0, the first data set of the current displayer is considered.
virtual void IlvSingleChartDisplayer::drawPoints ( IlvChartDisplayerPoints displayerPoints,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
protectedvirtual

Draws the graphical representation from points in screen coordinates corresponding to the data points to display.

The drawing is performed in the given port dst using the transformer t and the clipping region clip.

The default implementation of this method uses the IlvSingleChartDisplayer::getClipArea() method to obtain the clipping region to be used for the drawing. Then, for each point in screen coordinates stored in displayerPoints, it uses:

At the end, it uses the IlvSingleChartDisplayer::drawPointInfos() method to draw the point information (if any).

Parameters
displayerPointsThe object that stores the points in screen coordinates that have to be displayed by the current displayer. These points are considered to be already transformed by t.
dstThe port used for the drawing.
tThe optional transformer.
clipThe optional clipping region.

Reimplemented in IlvStairChartDisplayer, IlvPieChartDisplayer, Ilv3dBarChartDisplayer, IlvPolygonChartDisplayer, IlvHiLoChartDisplayer, IlvBubbleChartDisplayer, and IlvPolylineChartDisplayer.

virtual IlvColor* IlvSingleChartDisplayer::getBackground ( IlUInt  index = 0) const
virtual

Returns the background color of a palette used by the current displayer to display data.

If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just returns the background color of the palette stored inside the displayer. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method returns the background color of the palette used by the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers that compose the current displayer. Otherwise, this parameter can be omitted.
Returns
A pointer to the background color.

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::getClipArea ( IlvRect area,
const IlvTransformer t 
) const
virtual

Returns the clipping region that is used for the drawing.

The current implementation of the method returns in area the area obtained by the IlvSingleChartDisplayer::getDataDisplayArea() method expanded along the base by the shift offset if it is different from 0 (obtained by the IlvSingleChartDisplayer::getShiftOffset() method). The term base of a chart refers to the abscissa scale of this chart.

Parameters
areaThe clipping region that is used to clip the graphical representation of data drawn by the current displayer.
tThe transformer that is applied to the returned clipping region.

Implements IlvAbstractChartDisplayer.

Reimplemented in IlvFixedStepChartDisplayer, IlvPieChartDisplayer, Ilv3dBarChartDisplayer, IlvHiLoChartDisplayer, IlvBubbleChartDisplayer, IlvBarChartDisplayer, and IlvScatterChartDisplayer.

void IlvSingleChartDisplayer::getDataDisplayArea ( IlvRect dataDisplayArea,
const IlvTransformer t = 0 
) const

Returns the bounds of the data display area.

Returns in dataDisplayArea the maximum area where data can be displayed by the current displayer. This area is referred to as the data display area. It determines the limits outside of which the current displayer cannot display data.

Parameters
dataDisplayAreaThe returned data display area.
tThe transformer that is applied to the returned data display area.
IlvChartDisplayerPointsFactory* IlvSingleChartDisplayer::getDisplayerPointsFactory ( ) const

Returns the factory used to create IlvChartDisplayerPoints instances.

Returns
A pointer to the factory associated with the current displayer.
See also
setDisplayerPointsFactory().
virtual IlUInt IlvSingleChartDisplayer::getDisplayersCount ( ) const
virtual

Returns the number of displayers.

Returns
1.

Implements IlvAbstractChartDisplayer.

virtual IlUInt IlvSingleChartDisplayer::getDisplayItem ( IlvChartDataSet *&  dataSet,
const IlvPoint viewPoint,
const IlvTransformer t 
) const
virtual

Returns the item to which a view point corresponds.

Returns the index of the data point in the data set dataSet displayed by the current displayer that has its corresponding representation colliding with the point viewPoint. The returned index is equal to IlvBadIndex if no data point has been found. If the data set dataSet passed as a parameter is equal to 0, the nearest data point is searched for in all the data sets displayed by the current displayer. Otherwise, it is searched for in the data set dataSet. At the end, dataSet references the data set in which the data point has been found or 0 if no data set has been found. If no point has been found in a data set, dataSet is also equal to 0.

Parameters
dataSetThe data set from which a data point is retrieved.
viewPointThe point in screen coordinates for which we want to get the nearest displayed data point.
tThe optional transformer.
Returns
The index of the nearest data point that has been found.

Implements IlvAbstractChartDisplayer.

virtual IlBoolean IlvSingleChartDisplayer::getDisplayPoint ( const IlvChartDataSet dataSet,
IlUInt  dataPtIdx,
IlvPoint point,
const IlvTransformer t = 0 
) const
virtual

Returns the corresponding screen point for a data point.

Returns in point the point in screen coordinates corresponding to the data point at the index dataPtIdx in the data set data set to be displayed by the current displayer.

Parameters
dataSetThe data set to which the considered data point belongs.
dataPtIdxThe index of the considered data point in the data set dataSet.
pointThe screen point corresponding to the considered data point.
tThe transformer that is applied to the returned screen point.
Returns
IlTrue if the corresponding screen point has been successfully computed and IlFalse otherwise.

Implements IlvAbstractChartDisplayer.

virtual IlvColor* IlvSingleChartDisplayer::getForeground ( IlUInt  index = 0) const
virtual

Returns the foreground color of a palette used by the current displayer to display data.

If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just returns the foreground color of the palette stored inside the displayer. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method returns the foreground color of the palette used by the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers that compose the current displayer. Otherwise, this parameter can be omitted.
Returns
A pointer to the foreground color.

Implements IlvAbstractChartDisplayer.

virtual const char* IlvSingleChartDisplayer::getInternalLegendText ( IlUInt  index = 0) const
virtual

Returns the legend text stored in the current displayer.

This text, if it is defined, is used in a legend as comments for the data represented by the current displayer. (See the IlvAbstractChartDisplayer::getLegendText() method.) If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just returns the legend text stored inside the displayer. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method returns the legend text stored for the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers that compose the current displayer. Otherwise, this parameter can be omitted.
Returns
The legend text that is stored.

Implements IlvAbstractChartDisplayer.

virtual IlUInt IlvSingleChartDisplayer::getItemPointsCount ( const IlvChartDisplayerPoints displayerPoints) const
protectedvirtual

Returns the maximum number of points needed to define an item for the current displayer.

(See the IlvSingleChartDisplayer::computeItem() method for more details.)

Parameters
displayerPointsThe object that stores the points in screen coordinates that have to be displayed by the current displayer.
Returns
The maximum number of points needed to define an item for the current displayer.

Reimplemented in IlvStairChartDisplayer, IlvFixedStepChartDisplayer, IlvPieChartDisplayer, IlvStepChartDisplayer, IlvHiLoBarChartDisplayer, Ilv3dBarChartDisplayer, IlvHiLoChartDisplayer, IlvBubbleChartDisplayer, IlvPolylineChartDisplayer, IlvBarChartDisplayer, and IlvScatterChartDisplayer.

virtual const char* IlvSingleChartDisplayer::getLegendText ( IlUInt  index = 0) const
virtual

Returns the text that will be used in a legend for the current displayer.

If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just returns the legend text stored inside the displayer if it is defined. Otherwise, the method returns the name of the data set obtained by the IlvAbstractChartDisplayer::getRealDataSet() method. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method returns the text that will be used in a legend for the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers that compose the current displayer. Otherwise, this parameter can be omitted.
Returns
The text that will be used in a legend as comments for the data represented by the current displayer.

Implements IlvAbstractChartDisplayer.

Reimplemented in IlvHiLoChartDisplayer.

virtual IlUInt IlvSingleChartDisplayer::getNearestPoint ( IlvChartDataSet *&  dataSet,
const IlvPoint viewPoint,
IlvDim  distance,
IlvPoint point,
const IlvTransformer t = 0 
) const
virtual

Returns the nearest data point.

Returns the index of the data point in the data set dataSet displayed by the current displayer that has its corresponding point in screen coordinates nearest to the point viewPoint. The returned index is equal to IlvBadIndex if no data point has been found. If the data set dataSet passed as a parameter is equal to 0, the nearest data point is searched for in all the data sets displayed by the current displayer. Otherwise, it is searched for in the data set dataSet. At the end, dataSet references the data set in which the data point has been found or 0 if no data set has been found. If no point has been found in a data set, dataSet is also equal to 0.

Parameters
dataSetThe data set from which a data point is retrieved.
viewPointThe point in screen coordinates for which we want to get the nearest displayed data point.
distanceThe maximum distance allowed between viewPoint and the screen point corresponding to the returned data point.
pointThe screen point corresponding to the nearest data point that has been found.
tThe optional transformer.
Returns
The index of the nearest data point that has been found.

Implements IlvAbstractChartDisplayer.

IlUInt IlvSingleChartDisplayer::getNearestPointInsidePart ( const IlvCoordInterval abscissaRange,
IlBoolean  shiftOfCycleLength,
IlvChartDataSet *&  dataSet,
const IlvPoint viewPoint,
IlvDim  distance,
IlvPoint point,
const IlvTransformer t = 0 
) const
protected

Returns the nearest data point within a given abscissa range.

Returns the index of the data point in the data set dataSet displayed by the current displayer that has its corresponding point in screen coordinates nearest the point viewPoint. The data point is searched for only within the abscissa interval defined by abscissaRange.

The returned index is equal to IlvBadIndex if no data point has been found. If the data set dataSet passed as a parameter is equal to 0, the nearest data point is searched for in all the data sets displayed by the current displayer. Otherwise, it is searched for in the data set dataSet.

At the end, dataSet references the data set in which the data point has been found or 0 if no data set has been found. If no point has been found in a data set, dataSet is also equal to 0.

Parameters
abscissaRangeThe abscissa interval that is considered in order to find the nearest data point.
shiftOfCycleLengthA Boolean value indicating whether the data have been shifted by the cycle length before being displayed.
dataSetThe data set in which we get a data point.
viewPointThe point in screen coordinates for which we want to get the nearest displayed data point.
distanceThe maximum distance allowed between viewPoint and the screen point corresponding to the returned data point.
pointThe screen point corresponding to the nearest data point that has been found.
tThe optional transformer.
Returns
The index of the nearest data point that has been found.
Note
This method is used inside the IlvSingleChartDisplayer::getNearestPoint() method. Since the graphical representation is drawn by parts (see the IlvSingleChartDisplayer::drawPart() method), the search for the nearest data point of a given screen point is also performed by parts. Two parts are considered if the chart that uses the current displayer to display data is in cyclic mode (see the IlvChartGraphic::isInCyclicMode() method). One part is for data that have not been shifted by the cycle length before being displayed and the other part is for data that have been shifted by the cycle length before being displayed. (See the IlvCoordinateInfo::getFirstCycleRange() and IlvCoordinateInfo::getSecondCycleRange() methods for more details). Otherwise, only one part is considered.
virtual IlvPalette* IlvSingleChartDisplayer::getPalette ( IlUInt  index = 0) const
virtual

Returns a palette used by the current displayer to display data.

If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just returns the palette stored inside the displayer. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method returns the palette used by the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers composing the current displayer. Otherwise, this parameter can be omitted.
Returns
A pointer to the palette.

Implements IlvAbstractChartDisplayer.

virtual IlvPointInfoCollection* IlvSingleChartDisplayer::getPointInfoCollection ( const IlvChartDataSet dataSet) const
virtual

Returns the point information collection defined to be used to display a given data set.

Parameters
dataSetThe data set that will be displayed by the current displayer.
Returns
A pointer to the point information collection defined to be used to display the data set dataSet.

Implements IlvAbstractChartDisplayer.

IlvPos IlvSingleChartDisplayer::getShiftOffset ( ) const

Returns the offset by which the graphical representation of data is shifted along the base of the chart.

The term base of a chart refers to the abscissa scale of this chart. By default, the shift offset is equal to 0. This offset is useful when displaying side-by-side charts in which the graphical representations are shifted along the abscissa.

Returns
The offset by which the graphical representation of data displayed by the current displayer is shifted.
virtual IlvDim IlvSingleChartDisplayer::getSizeAlongBase ( ) const
virtual

Returns the size along the base for the graphical representation of a given data point.

The term base of a chart refers to the abscissa scale of this chart. This size is useful for displaying side-by-side charts. It is used to indicate the offset by which the graphical representation for a data point must be shifted so it can be drawn next to the graphical representation for another data point. For example, for a bar displayer, the size along the base corresponds to the width of a bar.

Returns
0 by default.

Reimplemented in IlvFixedStepChartDisplayer, IlvBubbleChartDisplayer, IlvBarChartDisplayer, IlvHiLoChartDisplayer, and IlvScatterChartDisplayer.

IlBoolean IlvSingleChartDisplayer::isDrawingFill ( ) const

Returns the filling mode for the current displayer.

See the IlvAbstractChartDisplayer::drawFill() method for more details.

Returns
IlTrue if the shape of the graphical representation of data is displayed filled and IlFalse otherwise.
virtual void IlvSingleChartDisplayer::releaseDisplayerPoints ( IlvChartDisplayerPoints dispPts) const
virtual

Releases an IlvChartDisplayerPoints object used by the current displayer.

Releases the IlvChartDisplayerPoints object dispPts when it is no more used by the current displayer. If a factory is associated with the current displayer, the IlvChartDisplayerPointsFactory::release() method is used. If no factory is defined, the delete operator is called on dispPts.

Parameters
dispPtsAn IlvChartDisplayerPoints object that is used by the current displayer.
See also
allocDisplayerPoints().
virtual IlvDoublePoint* IlvSingleChartDisplayer::selectDataPointsForPoint ( IlUInt  dataPtIdx,
IlUInt count,
IlUInt *&  dataPtIdxes 
) const
protectedvirtual

Selects and returns the data points needed to be able to display the graphical representation of the data point(s) at a given index in the real data set(s) to be displayed by the current displayer.

For example, for a displayer displaying a data set with a polyline, to be able to draw the graphical representation for a data point at a given index of the data set, we must select the data point at this index plus the data point at the index before (if it exists) and the data point at the index after (if it exists). The data points thus selected will allow the part of the polyline passing through the considered data point at a given index to be drawn.

The current implementation of this method simply returns the data point at the index dataPtIdx and stores this index in the array dataPtIdxes.

Parameters
dataPtIdxThe index of the data point(s) for which we want to select the data points that are needed to draw the graphical representation for the data point(s) at this index.
countThe number of selected data points.
dataPtIdxesAn array of the indexes of the selected data points.
Returns
An array of the selected data points.
Note
The allocated arrays of data points and data point indexes that are returned by this method must not be deleted since they are maintained internally.

Reimplemented in IlvPieChartDisplayer, IlvStepChartDisplayer, IlvPolygonChartDisplayer, IlvHiLoChartDisplayer, and IlvPolylineChartDisplayer.

virtual IlvDoublePoint* IlvSingleChartDisplayer::selectDataPointsForRange ( const IlvCoordInterval abscissaRange,
IlUInt pointCount,
IlUInt *&  dataPtIdxes,
const IlvTransformer t = 0,
const IlvRect clip = 0 
) const
protectedvirtual

Selects And returns the data points to display that are within a given abscissa interval.

The current implementation of the method takes the clipping region clip into account to select from the data points that are within abscissaRange only those that are needed to draw inside the clipping region.

Parameters
abscissaRangeThe abscissa interval used to select the data points.
pointCountThe number of selected data points.
dataPtIdxesAn array of the indexes of the selected data points.
tThe transformer (if any) that is used for drawing the data points by the current displayer.
clipThe clipping region (if any) that is used for drawing the data points by the current displayer.
Returns
An array of the selected data points.
Note
The allocated arrays of data points and data points indexes that are returned by this method must not be deleted since they are maintained internally.

Reimplemented in IlvPieChartDisplayer.

virtual IlvDoublePoint* IlvSingleChartDisplayer::selectDataPointsInRect ( IlUInt pointCount,
IlUInt *&  dataPtIndexes,
IlvRect  pickRect,
const IlvTransformer t = 0 
) const
protectedvirtual

Selects the data points that are rendered within a rectangle.

Parameters
pointCountIs set to the number of selected data points.
dataPtIndexesAn array of the indexes of the selected data points. You must not delete this array since it is maintained internally.
pickRectThe rectangle, in the port coordinates system, that locates the points to be selected.
tThe transformer (if any) that is used for drawing the data points by the current displayer.
Returns
An array of the selected data points. You must not delete this array since it is maintained internally.
virtual void IlvSingleChartDisplayer::setBackground ( IlvColor color,
IlUInt  index = 0 
)
virtual

Sets the background color of a palette used by the current displayer to display data.

If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just sets the background color of the palette stored inside the displayer. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method sets the background color of the palette used by the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
colorThe background color to be set.
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers that compose the current displayer. Otherwise, this parameter can be omitted.

Implements IlvAbstractChartDisplayer.

virtual IlBoolean IlvSingleChartDisplayer::setDataPoint ( IlvChartDataSet dataSet,
IlUInt  dataPtIdx,
const IlvPoint point,
const IlvTransformer t = 0 
) const
virtual

Sets the corresponding data point from a screen point.

Computes from the point in screen coordinates point the corresponding data point and sets this data point at the index dataPtIdx in the data set dataSet that is displayed by the current displayer.

Parameters
dataSetThe data set for which we want to set a data point.
dataPtIdxThe index of the data point to be set.
pointThe point in screen coordinates that is considered to be already transformed by t.
tThe transformer that has already been applied to point.
Returns
IlTrue if the data point has been successfully set and IlFalse otherwise.

Implements IlvAbstractChartDisplayer.

IlvChartDisplayerPointsFactory* IlvSingleChartDisplayer::setDisplayerPointsFactory ( IlvChartDisplayerPointsFactory factory)

Sets the factory used to create IlvChartDisplayerPoints instances.

The factory is used by the allocDisplayerPoints() and releaseDisplayerPoints() methods.

Parameters
factoryThe new factory.
Returns
The previous factory.
See also
getDisplayerPointsFactory().
virtual void IlvSingleChartDisplayer::setForeground ( IlvColor color,
IlUInt  index = 0 
)
virtual

Sets the foreground color of a palette used by the current displayer to display data.

If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just sets the foreground color of the palette stored inside the displayer. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method sets the foreground color of the palette used by the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
colorThe foreground color to be set.
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers that compose the current displayer. Otherwise, this parameter can be omitted.

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::setLegendItems ( IlvChartLegend legend) const
virtual

Sets the legend items associated with the current displayer.

Sets the legend items associated with the current displayer on the legend legend.

The current implementation simply calls the IlvChartLegend::addLegendItem() method one time if the current displayer can be viewed (see the IlvAbstractChartDisplayer::isViewable() method).

See the IlvAbstractChartDisplayer::setLegendItems() method for more details.

Parameters
legendThe legend that will display the legend items associated with the current displayer.

Implements IlvAbstractChartDisplayer.

Reimplemented in IlvPieChartDisplayer.

virtual void IlvSingleChartDisplayer::setLegendText ( const char *  text,
IlUInt  index = 0 
)
virtual

Sets the text that will be used in a legend for the current displayer.

If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just sets the legend text stored inside the displayer. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method sets the legend text defined for the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
textThe text that will be used in a legend for the current displayer. The text passed as a parameter is copied.
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers that compose the current displayer. Otherwise, this parameter can be omitted.

Implements IlvAbstractChartDisplayer.

virtual void IlvSingleChartDisplayer::setMode ( IlvDrawMode  mode)
virtual

Sets the drawing mode.

Sets the drawing mode for the current object. The information is passed to all the palettes used by the current displayer to display data.

Parameters
modeThe new drawing mode for the current object.

Implements IlvAbstractChartDisplayer.

Reimplemented in IlvPieChartDisplayer, Ilv3dBarChartDisplayer, and IlvHiLoChartDisplayer.

virtual void IlvSingleChartDisplayer::setOverwrite ( IlBoolean  o)
virtual

Sets the overwrite mode.

Modifies the way the drawing member functions of the current object operate when drawing on the root port. If the o parameter is set to IlFalse, the drawing operations are hidden by the windows stored on the top window. If the parameter is set to IlTrue, the drawing operations are performed on top of every window present on the screen, just as if the windows were part of the root window. The information is passed to all the palettes used by the current displayer to display data.

Parameters
oThe new value of the Boolean indicating the way the drawing member functions operate.

Implements IlvAbstractChartDisplayer.

Reimplemented in IlvPieChartDisplayer, Ilv3dBarChartDisplayer, and IlvHiLoChartDisplayer.

virtual void IlvSingleChartDisplayer::setPalette ( IlvPalette pal,
IlUInt  index = 0 
)
virtual

Sets a palette used by the current displayer to display data.

If the current displayer is a single displayer (that is, an object inherited from the IlvSingleChartDisplayer class), this method just sets the palette stored inside the displayer. If the current displayer is a composite displayer (that is, an object inherited from the IlvCompositeChartDisplayer class), this method sets the palette used by the displayer at the index index in the collection of displayers that compose the current displayer.

Parameters
palThe palette to be set.
indexIf the current displayer is a composite displayer, this parameter indicates the index of the displayer within the displayers composing the current displayer. Otherwise, this parameter can be omitted.

Implements IlvAbstractChartDisplayer.

Reimplemented in Ilv3dBarChartDisplayer.

virtual void IlvSingleChartDisplayer::setPointInfoCollection ( const IlvChartDataSet dataSet,
IlvPointInfoCollection ptInfoCollection 
)
virtual

Sets the point information collection that will be used to display a given data set.

This new point information collection has priority. It is the one that will be considered to display the data set dataSet, even if a point information collection has already been defined for the data set dataSet by using the IlvChartDataSet::setPointInfoCollection() method.

Parameters
dataSetThe data set that will be displayed by the current displayer.
ptInfoCollectionThe point information collection that will be used to display the data set dataSet.

Implements IlvAbstractChartDisplayer.

void IlvSingleChartDisplayer::setShiftOffset ( IlvPos  offset)

Sets the offset by which the graphical representation of data is shifted along the base of the chart.

The term base of a chart refers to the abscissa scale of this chart.

Parameters
offsetThe new offset used to shift the graphical representation of data displayed by the current displayer.
Note
This method is used internally and should not be used directly by the user. By default, the shift offset is set to 0. This offset is used by the side-by-side displayers to draw graphical representations that are shifted along the abscissa. In this case, an appropriate shift offset is automatically set in the IlvSideBySideChartDisplayer::updateDisplayers() method and, therefore, does not need to be set by hand.
virtual void IlvSingleChartDisplayer::treatPointsOutOfAbscissaLimits ( const IlvRect dataDisplayArea,
IlvChartDisplayerPoints displayerPoints,
const IlvCoordInterval abscissaRange,
const IlvPoint minLimit,
const IlvPoint maxLimit 
) const
virtual

Treats the occurrence of points in screen coordinates that are outside the abscissa limits.

The current implementation of the method simply removes the screen points stored in displayerPoints that are outside the abscissa limits. This means that they are before the minimum value considered for the abscissa or after the maximum value considered for the ordinate.

Note
The area dataDisplayArea, the points minLimit and maxLimit, and the points in screen coordinates stored in displayerPoints are considered to be already transformed.
Parameters
dataDisplayAreaThe data display area used by the current displayer.
displayerPointsThe object that stores the points in screen coordinates that have to be displayed by the current displayer.
abscissaRangeThe interval of values that is considered for the abscissa.
minLimitThe point on the abscissa scale that corresponds to the minimum value that is considered for the abscissa.
maxLimitThe point on the abscissa scale that corresponds to the maximum value that is considered for the abscissa.

Reimplemented in IlvStepChartDisplayer, and IlvPolylineChartDisplayer.

virtual IlBoolean IlvSingleChartDisplayer::usePointInfo ( ) const
virtual

Indicates whether point information collections are defined.

Returns
IlTrue if at least one point information collection is defined for one of the real data sets to be displayed by the current displayer (either the point information collection is defined only to be used by the current displayer or it has been set directly on the data set). Otherwise, it returns IlFalse.
virtual void IlvSingleChartDisplayer::write ( IlvOutputFile file) const
virtual

Writes the attributes of the current object in a file.

Called by the IlvAbstractChartDisplayer::save() method. This method can be overloaded in subclasses that define new attributes. The information written by the write() method is read by the IO constructor, which takes an IlvInputFile as its only argument. Both this method and the IO constructor can be automatically declared by using the DeclareChartDisplayerTypeInfo() macro within the class declaration.

Parameters
fileThe file where the attributes of the current object are written.

Reimplemented from IlvAbstractChartDisplayer.


© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.