Rogue Wave Views
Charts Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Types | Public Member Functions
IlvChartDataPointLabel Class Reference

Allows you to annotate data points with labels displaying the values of the data points. More...

#include <ilviews/charts/data.h>

Inheritance diagram for IlvChartDataPointLabel:
IlvChartDataGraphicInfo IlvChartDataPointInfo

Public Types

enum  AnnotationMode { YValue, XValue, XYValues }
 Available annotation modes. More...
 

Public Member Functions

 IlvChartDataPointLabel (IlvDisplay *display, IlvPos dx=0, IlvPos dy=0, IlvPosition position=IlvCenter, AnnotationMode mode=IlvChartDataPointLabel::YValue, const char *format="%g", IlvPalette *palette=0)
 Initializes a new IlvChartDataPointLabel object. More...
 
virtual IlBoolean boundingBox (const IlvPoint &, const IlvChartDataSet *, IlUInt, const IlvChartGraphic *, IlvRect &, const IlvTransformer *=0) const
 Returns the bounding box of the graphical information drawn next to the representation of the data point. More...
 
virtual void draw (const IlvPoint &, const IlvChartDataSet *, IlUInt, const IlvChartGraphic *, IlvPort *, const IlvTransformer *=0, const IlvRegion *=0) const
 Draws some graphical information next to the representation of the data point. More...
 
const char * getAnnotationFormat () const
 Returns the format used to translate data values into labels. More...
 
AnnotationMode getAnnotationMode () const
 Returns the annotation mode. More...
 
void setAnnotationFormat (const char *f)
 Sets the format used to translate data values into labels. More...
 
void setAnnotationMode (AnnotationMode mode)
 Sets the annotation mode. More...
 
- Public Member Functions inherited from IlvChartDataGraphicInfo
 IlvChartDataGraphicInfo (IlvGraphic *graphic, IlvPos dx=0, IlvPos dy=0, IlvPosition anchorPosition=IlvCenter, IlvPalette *palette=0)
 Initializes a new IlvChartDataGraphicInfo object. More...
 
virtual ~IlvChartDataGraphicInfo ()
 Destructor. More...
 
IlvPosition getAnchorPosition () const
 Returns the anchor position of the graphic object. More...
 
IlvGraphicgetGraphic () const
 Returns the stored graphic object. More...
 
const IlvPointgetOffset () const
 Returns the offset that is used to draw the graphic object. More...
 
void setAnchorPosition (IlvPosition position)
 Sets the anchor position of the graphic object. More...
 
void setGraphic (IlvGraphic *graphic)
 Sets the graphic object that is drawn. More...
 
virtual void setMode (IlvDrawMode)
 Sets the drawing mode. More...
 
void setOffset (const IlvPoint &offset)
 Sets the offset that is used to draw the stored graphic object. More...
 
virtual void setOverwrite (IlBoolean)
 Sets the way the drawing member functions operate. More...
 
- Public Member Functions inherited from IlvChartDataPointInfo
 IlvChartDataPointInfo (IlvPalette *palette=0)
 Initializes a new IlvChartDataPointInfo object. More...
 
 IlvChartDataPointInfo (const IlvChartDataPointInfo &pointInfo)
 Initializes a new IlvChartDataPointInfo object as a copy of another IlvChartDataPointInfo. More...
 
 IlvChartDataPointInfo (IlvInputFile &file)
 Initializes a new IlvChartDataPointInfo object from an input file. More...
 
virtual ~IlvChartDataPointInfo ()
 Destructor. More...
 
virtual IlvChartDataPointInfocopy () const
 Creates and returns a copy of the current object. More...
 
IlvPalettegetPalette () const
 Returns the specific palette. More...
 
virtual IlBoolean getPalette (const IlvChartDataSet *dataSet, IlUInt idx, const IlvAbstractChartDisplayer *disp, const IlvPalette *defaultPalette, IlvPalette *returnPalette) const
 Gets the specific palette for a point in the same collection. More...
 
void lock ()
 Locks the current IlvChartDataPointInfo object. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
void setForeground (IlvColor *color)
 Sets the foreground color for the specific palette. More...
 
void setPalette (IlvPalette *pal)
 Sets the specific palette. More...
 
void unLock ()
 Unlocks the current IlvChartDataPointInfo object. More...
 
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvChartDataPointInfo
static IlvChartDataPointInfoLoad (IlvInputFile &file)
 Reads a point information object from a file. More...
 
static IlvChartDataPointInfoRead (IlvInputFile &file)
 Reads the attributes of a point information object from a file. More...
 

Detailed Description

Allows you to annotate data points with labels displaying the values of the data points.

Library: ilvcharts
This class is a subclass of IlvChartDataGraphicInfo that allows you to annotate data points with labels displaying the values of the data points.

See also
IlvChartDataGraphicInfo, IlvPointInfoCollection.

Member Enumeration Documentation

§ AnnotationMode

Available annotation modes.

This enumeration type indicates how data points are annotated.

Enumerator
YValue 

The ordinate value of the data point is displayed.

XValue 

The abscissa value of the data point is displayed.

XYValues 

Both the abscissa and the ordinate values of the data point are displayed.

Constructor & Destructor Documentation

§ IlvChartDataPointLabel()

IlvChartDataPointLabel::IlvChartDataPointLabel ( IlvDisplay display,
IlvPos  dx = 0,
IlvPos  dy = 0,
IlvPosition  position = IlvCenter,
AnnotationMode  mode = IlvChartDataPointLabel::YValue,
const char *  format = "%g",
IlvPalette palette = 0 
)

Initializes a new IlvChartDataPointLabel object.

Parameters
displayThe display connection that will handle the drawing of the label annotation.
dxThe x-offset that is used to draw the label annotation from the projected data point.
dyThe y-offset that is used to draw the label annotation from the projected data point.
positionThe position that specifies which point of the bounding box of the label annotation should be used as a reference.
modeThe annotation mode.
formatThe format used to translate data values into labels.
paletteThe palette that is used to draw the data point.

Member Function Documentation

§ boundingBox()

virtual IlBoolean IlvChartDataPointLabel::boundingBox ( const IlvPoint point,
const IlvChartDataSet dataSet,
IlUInt  ptidx,
const IlvChartGraphic chart,
IlvRect bbox,
const IlvTransformer t = 0 
) const
virtual

Returns the bounding box of the graphical information drawn next to the representation of the data point.

Returns the bounding box of the stored graphic object.

Parameters
pointThe coordinates of the projected data point.
dataSetThe data set holding the considered data point.
ptidxThe index of the considered data point in the dataSet dataSet.
chartThe chart object for which the graphical information is drawn.
bboxThe returned bounding box.
tThe applied transformer.
Returns
IlTrue if the bounding box has been successfully computed and IlFalse otherwise.

Reimplemented from IlvChartDataGraphicInfo.

§ draw()

virtual void IlvChartDataPointLabel::draw ( const IlvPoint point,
const IlvChartDataSet dataSet,
IlUInt  ptidx,
const IlvChartGraphic chart,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws some graphical information next to the representation of the data point.

Draws the stored graphic object with respect to the projected data point given by point.

Parameters
pointThe coordinates of the projected data point.
dataSetThe data set holding the considered data point.
ptidxThe index of the considered data point in the dataSet dataSet.
chartThe chart object for which the graphical information is drawn.
dstThe port where the graphical representation is drawn.
tThe transformer applied to dst.
clipThe clipping region.

Reimplemented from IlvChartDataGraphicInfo.

§ getAnnotationFormat()

const char* IlvChartDataPointLabel::getAnnotationFormat ( ) const

Returns the format used to translate data values into labels.

Returns
The format used to translate data values into labels.

§ getAnnotationMode()

AnnotationMode IlvChartDataPointLabel::getAnnotationMode ( ) const

Returns the annotation mode.

Returns
The annotation mode.

§ setAnnotationFormat()

void IlvChartDataPointLabel::setAnnotationFormat ( const char *  f)

Sets the format used to translate data values into labels.

Parameters
fThe new format used to translate data values into labels.

§ setAnnotationMode()

void IlvChartDataPointLabel::setAnnotationMode ( AnnotationMode  mode)

Sets the annotation mode.

Parameters
modeThe new annotation mode.

© Copyright 2018, 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.