Rogue Wave Views Charts Package API Reference Guide |
Rogue Wave Views Documentation Home |
Allows you to annotate data points with labels displaying the values of the data points. More...
#include <ilviews/charts/data.h>
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... | |
IlvGraphic * | getGraphic () const |
Returns the stored graphic object. More... | |
const IlvPoint & | getOffset () 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 IlvChartDataPointInfo * | copy () const |
Creates and returns a copy of the current object. More... | |
IlvPalette * | getPalette () 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... | |
IlvOutputFile & | save (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 IlvChartDataPointInfo * | Load (IlvInputFile &file) |
Reads a point information object from a file. More... | |
static IlvChartDataPointInfo * | Read (IlvInputFile &file) |
Reads the attributes of a point information object from a file. More... | |
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.
Available annotation modes.
This enumeration type indicates how data points are annotated.
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.
display | The display connection that will handle the drawing of the label annotation. |
dx | The x-offset that is used to draw the label annotation from the projected data point. |
dy | The y-offset that is used to draw the label annotation from the projected data point. |
position | The position that specifies which point of the bounding box of the label annotation should be used as a reference. |
mode | The annotation mode. |
format | The format used to translate data values into labels. |
palette | The palette that is used to draw the data point. |
|
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.
point | The coordinates of the projected data point. |
dataSet | The data set holding the considered data point. |
ptidx | The index of the considered data point in the dataSet dataSet. |
chart | The chart object for which the graphical information is drawn. |
bbox | The returned bounding box. |
t | The applied transformer. |
IlTrue
if the bounding box has been successfully computed and IlFalse
otherwise. Reimplemented from IlvChartDataGraphicInfo.
|
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.
point | The coordinates of the projected data point. |
dataSet | The data set holding the considered data point. |
ptidx | The index of the considered data point in the dataSet dataSet. |
chart | The chart object for which the graphical information is drawn. |
dst | The port where the graphical representation is drawn. |
t | The transformer applied to dst. |
clip | The clipping region. |
Reimplemented from IlvChartDataGraphicInfo.
const char* IlvChartDataPointLabel::getAnnotationFormat | ( | ) | const |
Returns the format used to translate data values into labels.
AnnotationMode IlvChartDataPointLabel::getAnnotationMode | ( | ) | const |
Returns the annotation mode.
void IlvChartDataPointLabel::setAnnotationFormat | ( | const char * | f | ) |
Sets the format used to translate data values into labels.
f | The new format used to translate data values into labels. |
void IlvChartDataPointLabel::setAnnotationMode | ( | AnnotationMode | mode | ) |
Sets the annotation mode.
mode | The 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.