Views
Charts Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Types | Public Member Functions | Protected Member Functions
IlvBubbleChartDisplayer Class Reference

Class for bubble displayers. More...

#include <ilviews/charts/bubble.h>

Inheritance diagram for IlvBubbleChartDisplayer:
IlvSingleChartDisplayer IlvAbstractChartDisplayer IlvValueInterface

Public Types

enum  BubbleSizeMode { MinMax, Scaling }
 This enumeration type defines how the size of the bubbles is computed. More...
 

Public Member Functions

 IlvBubbleChartDisplayer (IlvGraphic *graphic, IlDouble scaling, IlvPalette *palette=0)
 Constructor. More...
 
 IlvBubbleChartDisplayer (IlvGraphic *graphic, IlvDim maxSize=40, IlvDim minSize=0, IlvPalette *palette=0)
 Constructor. More...
 
virtual ~IlvBubbleChartDisplayer ()
 Destructor. 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 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 void getClipArea (IlvRect &area, const IlvTransformer *t) const
 Returns the clipping region that is used for the drawing. More...
 
IlvGraphicgetGraphicModel () const
 Returns the graphic object that is used as bubbles. More...
 
IlvDim getGraphicSize (IlUInt pointIndex) const
 Returns the size of the graphic object that will be displayed as bubble for the data point at a given index. More...
 
IlvDim getMaxSize () const
 Returns the maximum size that the bubbles will have on the screen. More...
 
IlvDim getMinSize () const
 Returns the minimum size that the bubbles will have on the screen. More...
 
IlDouble getScaling () const
 Retrieves the scaling factor used to compute the bubble size. More...
 
virtual IlvDim getSizeAlongBase () const
 Returns the size along the base for the graphical representation of a given data point. More...
 
IlvChartDataSetgetSizeDataSet () const
 Returns the data set that indicates the size of the bubbles. More...
 
virtual IlBoolean isViewable () const
 Indicates whether the graphical representation can be viewed. More...
 
IlvGraphicsetGraphicModel (IlvGraphic *graphic)
 Sets the graphic object that is used as bubbles. More...
 
void setMaxSize (IlvDim maxSize)
 Sets the maximum size that the bubbles will have on the screen. More...
 
void setMinSize (IlvDim minSize)
 Sets the minimum size that the bubbles will have on the screen. More...
 
void setScaling (IlDouble scaling)
 Sets the scaling factor used to compute the bubble size. More...
 
- Public Member Functions inherited from IlvSingleChartDisplayer
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 IlvColorgetBackground (IlUInt index=0) const
 Returns the background color of a palette used by the current displayer to display data. 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...
 
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...
 
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

virtual void boundingBoxOfItem (const IlvChartDisplayerPoints *displayerPoints, IlUInt pointIndex, IlUInt pointCount, IlvPoint *points, IlvRect &bbox, IlBoolean takeInfoIntoAccount=IlTrue, const IlvTransformer *t=0) const
 Computes the bounding box of the item drawn for a given point in screen coordinates corresponding to a data point to display. More...
 
virtual void boundingBoxOfPoints (IlvChartDisplayerPoints *displayerPoints, IlvRect &bbox, IlBoolean takeInfoIntoAccount, const IlvTransformer *t=0) const
 Computes the bounding box of the graphical representation from points in screen coordinates corresponding to the data points to display. More...
 
virtual void computeItem (const IlvChartDisplayerPoints *displayerPoints, IlUInt pointIndex, IlUInt &usedPointsCount, IlvPoint *points, const IlvTransformer *t=0) const
 Computes the item that will be displayed for a given point in screen coordinates corresponding to a data point to display. More...
 
virtual void drawItem (const IlvChartDisplayerPoints *displayerPoints, IlUInt pointIndex, IlUInt pointCount, IlvPoint *points, IlvPalette *itemPalette, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the item for a given point in screen coordinates corresponding to a data point 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...
 
virtual void update ()
 Performs the updates needed when modifications are made to the real data sets. More...
 
- Protected Member Functions inherited from IlvSingleChartDisplayer
 IlvSingleChartDisplayer (const IlvSingleChartDisplayer &displayer)
 Constructor. More...
 
 IlvSingleChartDisplayer (IlvInputFile &file)
 Constructor. More...
 
 IlvSingleChartDisplayer (IlvPalette *palette=0)
 Constructor. 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 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...
 
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...
 
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 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

Class for bubble displayers.

Library: ilvcharts

This class is a subclass of IlvSingleChartDisplayer which allows you to represent data with bubbles.

The bubble displayer displays two data sets. The first data set indicates the location of the bubbles and the second data set indicates the size of the bubbles.

Note
The two data sets must have the same number of data items.

Any graphic object can be used as bubbles.

This displayer can be used with any type of projection. (See the IlvAbstractProjector class for more details.)

The following images show data sets represented with a bubble displayer in a Cartesian chart (on the left) and a polar chart (on the right).

See also
IlvSingleChartDisplayer.

Member Enumeration Documentation

◆ BubbleSizeMode

This enumeration type defines how the size of the bubbles is computed.

Enumerator
MinMax 

The size of the bubbles is computed by specifying a maximum and a minimum size.

Scaling 

The size of the bubbles is computed by applying a scaling factor to the data values.

Constructor & Destructor Documentation

◆ IlvBubbleChartDisplayer() [1/2]

IlvBubbleChartDisplayer::IlvBubbleChartDisplayer ( IlvGraphic graphic,
IlvDim  maxSize = 40,
IlvDim  minSize = 0,
IlvPalette palette = 0 
)

Constructor.

Initializes a new IlvBubbleChartDisplayer object.

Parameters
graphicThe graphic object that will be used to display the bubbles.
maxSizeThe maximum size that the bubbles will have on the screen.
minSizeThe minimum size that the bubbles will have on the screen.
paletteThe palette that will be used to display the bubbles.

◆ IlvBubbleChartDisplayer() [2/2]

IlvBubbleChartDisplayer::IlvBubbleChartDisplayer ( IlvGraphic graphic,
IlDouble  scaling,
IlvPalette palette = 0 
)

Constructor.

Initializes a new IlvBubbleChartDisplayer object.

Parameters
graphicThe graphic object that will be used to display the bubbles.
scalingThe scaling factor that is applied to the data values to compute the size of the bubbles.
paletteThe palette that will be used to display the bubbles.

◆ ~IlvBubbleChartDisplayer()

virtual IlvBubbleChartDisplayer::~IlvBubbleChartDisplayer ( )
virtual

Destructor.

The destructor deletes the graphic object that is used to display the bubbles.

Member Function Documentation

◆ boundingBoxOfItem()

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

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

Computes the bounding box of the item drawn for the point in screen coordinates that is stored at the index pointIndex in the displayerPoints object. (See the IlvSingleChartDisplayer::boundingBoxOfItem method for more details.)

This method returns the bounding box of the bubble centered on the screen point stored in points.

Reimplemented from IlvSingleChartDisplayer.

◆ boundingBoxOfPoints()

virtual void IlvBubbleChartDisplayer::boundingBoxOfPoints ( IlvChartDisplayerPoints displayerPoints,
IlvRect bbox,
IlBoolean  takeInfoIntoAccount,
const IlvTransformer t = 0 
) const
protectedvirtual

Computes the bounding box of the graphical representation from points in screen coordinates corresponding to the data points to display.

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

This method calls the IlvSingleChartDisplayer::boundingBoxOfPoints() method. Then, the computed bounding box is expanded of the maximum size of the displayed bubbles divided by 2.

Note
The computed bounding box is slightly larger than the real bounding box to avoid expensive computations on IlvRect objects.

Reimplemented from IlvSingleChartDisplayer.

◆ computeItem()

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

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

Computes the points defining the item that will be displayed for the point in screen coordinates that is stored at the index pointIndex in the displayerPoints object. This object stores the points in screen coordinates corresponding to the data points that have to be displayed by the current displayer. (See the IlvSingleChartDisplayer::computeItem method for more details.)

This method just returns in points the point at the index pointIndex since the item that will be displayed for a given screen point corresponding to a data point to display is a bubble centered on this screen point.

The number of computed points defining the item (that is, 1) is returned in usedPointsCount.

Implements IlvSingleChartDisplayer.

◆ drawItem()

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

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

Draws the item for the point in screen coordinates that is stored at the index pointIndex in the displayerPoints object. This object stores the points in screen coordinates corresponding to the data points that have to be displayed by the current displayer. (See the IlvSingleChartDisplayer::drawItem method for more details.)

This method draws the graphic object defined to be used as bubbles centered on the screen point stored in points. The size of the graphic object is given by the IlvBubbleChartDisplayer::getGraphicSize method. The graphic object is drawn with the palette itemPalette.

Implements IlvSingleChartDisplayer.

◆ drawLegendItem()

virtual void IlvBubbleChartDisplayer::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 current implementation of this method draws the graphic object used to display the bubbles.

Parameters
dstThe port used for the drawing.
legendAreaThe area where the graphic object is drawn.
itemPalThe legend item palette associated with the current displayer.
clipThe clipping region.
clientDataThe client data for the legend item associated with the current displayer.

Reimplemented from IlvSingleChartDisplayer.

◆ drawPoints()

virtual void IlvBubbleChartDisplayer::drawPoints ( IlvChartDisplayerPoints displayerPoints,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

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 from IlvSingleChartDisplayer.

◆ getClipArea()

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

Returns the clipping region that is used for the drawing.

Returns in area the area obtained by the IlvSingleChartDisplayer::getClipArea method expanded by the maximum size that the bubbles will have on the screen.

Parameters
areaThe returned clipping region.
tThe transformer applied to the returned clipping region.

Reimplemented from IlvSingleChartDisplayer.

◆ getGraphicModel()

IlvGraphic* IlvBubbleChartDisplayer::getGraphicModel ( ) const

Returns the graphic object that is used as bubbles.

Returns
A pointer to the graphic object that is used to display the bubbles if such an object is defined or 0 otherwise.

◆ getGraphicSize()

IlvDim IlvBubbleChartDisplayer::getGraphicSize ( IlUInt  pointIndex) const

Returns the size of the graphic object that will be displayed as bubble for the data point at a given index.

Parameters
pointIndexThe index of the data point for which we want to get the size of the drawn bubble.
Returns
The size of the graphic object that will be displayed as a bubble for the data point at the index pointIndex.

◆ getItemPointsCount()

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

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

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

Parameters
displayerPointsThe object that stores the points in screen coordinates to be displayed by the current displayer.
Returns
1.

Reimplemented from IlvSingleChartDisplayer.

◆ getMaxSize()

IlvDim IlvBubbleChartDisplayer::getMaxSize ( ) const

Returns the maximum size that the bubbles will have on the screen.

Returns
The maximum size that the bubbles will have on the screen.

◆ getMinSize()

IlvDim IlvBubbleChartDisplayer::getMinSize ( ) const

Returns the minimum size that the bubbles will have on the screen.

Returns
The minimum size that the bubbles will have on the screen.

◆ getScaling()

IlDouble IlvBubbleChartDisplayer::getScaling ( ) const

Retrieves the scaling factor used to compute the bubble size.

Returns
The scaling factor that is applied to the data values to compute the size of the bubbles.

◆ getSizeAlongBase()

virtual IlvDim IlvBubbleChartDisplayer::getSizeAlongBase ( ) const
virtual

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

See the IlvSingleChartDisplayer::getSizeAlongBase method for more details.

Returns
The maximum size that the bubbles will have on the screen.

Reimplemented from IlvSingleChartDisplayer.

◆ getSizeDataSet()

IlvChartDataSet* IlvBubbleChartDisplayer::getSizeDataSet ( ) const

Returns the data set that indicates the size of the bubbles.

Returns
A pointer to the data set that indicates the size of the bubbles.

◆ isViewable()

virtual IlBoolean IlvBubbleChartDisplayer::isViewable ( ) const
virtual

Indicates whether the graphical representation can be viewed.

Returns a Boolean indicating whether the graphical representation displayed by the current displayer is viewable. The graphical representation displayed by the current displayer is viewable if and only if all the elements required to be able to display this graphical representation are verified. It is viewable if the method IlvSingleChartDisplayer::isViewable returns IlTrue, if a graphic object to be used as bubbles is defined and if the number of data sets to display is equal to 2.

Returns
IlTrue if the graphical representation displayed by the current displayer is viewable and IlFalse otherwise.

Reimplemented from IlvAbstractChartDisplayer.

◆ setGraphicModel()

IlvGraphic* IlvBubbleChartDisplayer::setGraphicModel ( IlvGraphic graphic)

Sets the graphic object that is used as bubbles.

Parameters
graphicThe new graphic object that is used as bubbles.

◆ setMaxSize()

void IlvBubbleChartDisplayer::setMaxSize ( IlvDim  maxSize)

Sets the maximum size that the bubbles will have on the screen.

Parameters
maxSizeThe new maximum size that the bubbles will have on the screen.

◆ setMinSize()

void IlvBubbleChartDisplayer::setMinSize ( IlvDim  minSize)

Sets the minimum size that the bubbles will have on the screen.

Parameters
minSizeThe new minimum size that the bubbles will have on the screen.

◆ setScaling()

void IlvBubbleChartDisplayer::setScaling ( IlDouble  scaling)

Sets the scaling factor used to compute the bubble size.

Parameters
scalingThe new scaling factor that is applied to the data values to compute the size of the bubbles.

◆ update()

virtual void IlvBubbleChartDisplayer::update ( )
protectedvirtual

Performs the updates needed when modifications are made to the real data sets.

Performs the updates needed when modifications (removing, adding, or replacing data sets) are made to the real data sets to be displayed by the current displayer.

The current implementation of the method sets a dedicated listener on the data set indicating the size of the bubbles. This listener will allow the size of the bubbles on the screen to be updated when modifications are made to the data set indicating the size of the bubbles.

Reimplemented from IlvAbstractChartDisplayer.