Rogue Wave Views |
Rogue Wave Views Documentation Home |
Implementation of predefined Cartesian charts. More...
#include <ilviews/charts/simplegr.h>
Public Member Functions | |
IlvCartesianChart (IlvDisplay *display, const IlvRect &bbox, IlBoolean useGrid=IlFalse, IlvCartesianProjector::Orientation orientation=IlvCartesianProjector::IlvXRightYTop, IlvPalette *palette=0, IlvPalette *gridPalette=0) | |
Constructor. More... | |
Public Member Functions inherited from IlvChartGraphic | |
IlvChartGraphic (IlvDisplay *display, const IlvRect &bbox, IlvPalette *palette=0) | |
Constructor. More... | |
virtual | ~IlvChartGraphic () |
Destructor. More... | |
IlvAbstractChartCursor * | addAbscissaCursor (IlDouble value, IlvPalette *palette=0, IlBoolean reDraw=IlTrue) |
Adds a cursor on the abscissa axis. More... | |
IlvAbstractGridDisplayer * | addAbscissaGrid (IlvPalette *majorPalette=0, IlvPalette *minorPalette=0, IlBoolean reDraw=IlTrue) |
Adds a grid on the abscissa axis. More... | |
IlBoolean | addDisplayer (IlvAbstractChartDisplayer *displayer, IlvChartDataSet *dataSet=0, IlvCoordinateInfo *ordinateInfo=0, IlUInt position=IlvLastPositionIndex) |
Adds a displayer connected to one data set. More... | |
virtual IlBoolean | addDisplayer (IlvAbstractChartDisplayer *displayer, IlUInt count, IlvChartDataSet *const *dataSets, IlvCoordinateInfo *ordinateInfo=0, IlUInt position=IlvLastPositionIndex) |
Adds a displayer connected to several data sets. More... | |
IlvAbstractChartCursor * | addOrdinateCursor (IlDouble value, IlvPalette *palette=0, IlUInt index=0, IlBoolean reDraw=IlTrue) |
Adds a cursor on an ordinate axis. More... | |
IlvAbstractGridDisplayer * | addOrdinateGrid (IlvPalette *majorPalette=0, IlvPalette *minorPalette=0, IlUInt index=0, IlBoolean reDraw=IlTrue) |
Adds a grid to an ordinate axis. More... | |
void | addOrdinateScale (IlvAbstractScaleDisplayer *scale) |
Adds an ordinate scale. More... | |
virtual void | dataPointsAdded (const IlvChartDataSet *ds, IlUInt iMin, IlUInt iMax, IlBoolean reDraw=IlTrue) |
Performs the automatic update when new data are added. More... | |
IlBoolean | dataPointsToDisplay (IlUInt count, const IlvDoublePoint *dataPoints, IlvPoint *points, const IlvCoordinateInfo *ordinateInfo, IlBoolean shiftOfCycleLength, const IlvTransformer *t=0) const |
Converts data points to screen coordinates. More... | |
IlBoolean | displayToDataPoints (IlUInt count, const IlvPoint *points, IlvDoublePoint *dataPoints, const IlvCoordinateInfo *ordinateInfo, IlBoolean shiftOfCycleLength, const IlvTransformer *t=0) const |
Converts screen coordinates to data points. More... | |
void | enableFastScroll (IlBoolean enable) |
Enables a very efficient refresh in Shift scroll mode. More... | |
IlvAbstractGridDisplayer * | getAbscissaGrid () const |
Returns the abscissa grid. More... | |
IlvCoordinateInfo * | getAbscissaInfo () const |
Returns the coordinate information object of the abscissa. More... | |
IlvSingleScaleDisplayer * | getAbscissaScale () const |
Returns the abscissa scale. More... | |
const IlvAxisCrossing * | getAxisCrossing (IlInt index) const |
Gets crossing between coordinate axes. More... | |
IlvAbstractChartCursor * | getCycleCursor () const |
Returns the cycle cursor. More... | |
IlvAbstractChartData * | getData () const |
Returns the chart data object that manages the data sets displayed by the current object. More... | |
void | getDataDisplayArea (IlvRect &dataDisplayArea, const IlvTransformer *t=0) const |
Returns the data display area of the chart. More... | |
void | getDataDisplayArea (const IlvCoordinateInfo *coordInfo, IlvRect &dataDisplayArea, const IlvTransformer *t=0) const |
Returns the rectangle where the data values of a coordinate are projected. More... | |
IlvChartDataSet * | getDataSet (IlUInt dataSetIndex) const |
Returns a given data set. More... | |
IlUInt | getDataSetIndex (const IlvChartDataSet *dataSet) const |
Returns the index of a given data set. More... | |
IlvChartDataSet *const * | getDataSets (IlUInt &dataSetCount) const |
Returns the data sets. More... | |
IlUInt | getDataSetsCount () const |
Returns the number of data sets. More... | |
IlvAbstractChartDisplayer * | getDisplayer (IlUInt displayerIndex) const |
Gets one specific displayer by index. More... | |
IlvAbstractChartDisplayer * | getDisplayerByName (const char *name) const |
Gets one specific displayer by name. More... | |
IlUInt | getDisplayerIndex (const IlvAbstractChartDisplayer *displayer) const |
Returns the index of a displayer. More... | |
IlUInt | getDisplayersCount () const |
Returns the number of displayers. More... | |
IlUInt | getDisplayItem (IlvAbstractChartDisplayer *&displayer, IlvChartDataSet *&dataSet, const IlvPoint &viewPoint, const IlvTransformer *t) const |
Returns the data point whose representation on the chart includes a given screen point of the chart graphic. More... | |
IlBoolean | getDrawingArea (IlvRect &drawingArea, const IlvTransformer *t=0) const |
Returns the drawing area of the chart. More... | |
void | getGraphArea (IlvRect &graphArea, const IlvTransformer *t=0) const |
Returns the graph area of the chart. More... | |
IlvChartLayout * | getLayout () const |
Returns the chart layout object. More... | |
IlvChartLegend * | getLegend () const |
Returns the legend. More... | |
IlUInt | getNearestPoint (IlvAbstractChartDisplayer *&displayer, IlvChartDataSet *&dataSet, const IlvPoint &viewPoint, IlvDim distance, IlvPoint &point, const IlvTransformer *t) const |
Returns the nearest data point from a screen point of the chart graphic. More... | |
IlvAbstractGridDisplayer * | getOrdinateGrid (IlUInt index=0) const |
Gets an ordinate grid by index. More... | |
IlUInt | getOrdinateGridIndex (const IlvAbstractGridDisplayer *grid) const |
Returns the index of an ordinate grid. More... | |
IlvCoordinateInfo * | getOrdinateInfo (IlUInt index=0) const |
Returns the coordinate information object of an ordinate axis. More... | |
IlUInt | getOrdinateInfoCount () const |
Returns the number of ordinate coordinate information objects. More... | |
IlUInt | getOrdinateInfoIndex (const IlvCoordinateInfo *info) const |
Returns the index of an ordinate coordinate information object. More... | |
IlvAbstractScaleDisplayer * | getOrdinateScale (IlUInt index=0) const |
Gets an ordinate scale by index. More... | |
IlUInt | getOrdinateScaleIndex (const IlvAbstractScaleDisplayer *scale) const |
Returns the index of an ordinate scale. More... | |
IlUInt | getOrdinateScalesCount () const |
Returns the number of ordinate scales. More... | |
IlvSingleScaleDisplayer * | getOrdinateSingleScale (IlUInt index=0) const |
Gets a single ordinate scale by index. More... | |
IlvPalette * | getProjectedPointsPalette () const |
Returns the palette used to display the out-of-bounds data points that are projected. More... | |
IlvAbstractProjector * | getProjector () const |
Returns the projector. More... | |
void | getProjectorArea (const IlvCoordinateInfo *coordInfo, IlvProjectorArea &projArea, const IlvTransformer *t) const |
Returns the description of the projecting area associated with a coordinate. More... | |
void | getProjectorArea (const IlvAbstractScaleDisplayer *scale, IlvProjectorArea &projArea, const IlvTransformer *t=0) const |
Returns the description of the projecting area associated with a scale. More... | |
IlvSingleScaleDisplayer * | getScaleForCursor (const IlvAbstractChartCursor *cursor) const |
Returns the scale for a cursor. More... | |
IlvAbstractChartCursor * | getScrollCursor () const |
Returns the scrolling cursor. More... | |
ScrollMode | getScrollMode () const |
Returns the scrolling mode. More... | |
IlDouble | getScrollRatio () const |
Returns the scrolling ratio. More... | |
virtual void | insertOrdinateScale (IlvAbstractScaleDisplayer *scale, IlUInt index=0) |
Inserts an ordinate scale. More... | |
IlBoolean | isFastScrollEnabled () const |
Queries for the Fast Scroll mode. More... | |
IlBoolean | isReDrawnWhenNotified () const |
Indicates whether an automatic redraw is performed. More... | |
void | moveCursor (IlvAbstractChartCursor *cursor, IlDouble newValue, IlBoolean reDraw=IlTrue) |
Moves a cursor. More... | |
virtual void | moveDisplayer (IlUInt displayerIndex, IlUInt newIndex) |
Changes the stacking order of a displayer. More... | |
IlBoolean | projectHorizontally () const |
Indicates whether there is a horizontal projection of out-of-bounds data points. More... | |
IlBoolean | projectVertically () const |
Indicates whether there is a vertical projection of out-of-bounds data points. More... | |
void | reDrawWhenNotified (IlBoolean reDraw) |
Specifies whether an automatic redraw is performed. More... | |
IlvAbstractChartCursor * | removeAbscissaCursor (IlvAbstractChartCursor *cursor, IlBoolean reDraw=IlTrue) |
Removes a cursor from the abscissa axis. More... | |
void | removeAbscissaGrid (IlBoolean reDraw=IlTrue) |
Removes the grid from the abscissa axis. More... | |
virtual void | removeAbscissaScale () |
Removes the abscissa scale. More... | |
virtual IlBoolean | removeDisplayer (IlUInt displayerIndex) |
Removes a displayer. More... | |
virtual void | removeDisplayers () |
Removes all displayers. | |
IlvAbstractChartCursor * | removeOrdinateCursor (IlvAbstractChartCursor *cursor, IlUInt index=0, IlBoolean reDraw=IlTrue) |
Removes a cursor from an ordinate axis. More... | |
void | removeOrdinateGrid (IlUInt index=0, IlBoolean reDraw=IlTrue) |
Removes the grid from an ordinate axis. More... | |
virtual void | removeOrdinateGrids () |
Removes all the ordinate grids. More... | |
virtual void | removeOrdinateScale (IlUInt index) |
Removes an ordinate scale. More... | |
virtual void | removeOrdinateScales () |
Removes all the ordinate scales. More... | |
virtual IlBoolean | replaceDisplayer (IlvAbstractChartDisplayer *oldDisplayer, IlvAbstractChartDisplayer *newDisplayer, IlBoolean copyPalettes=IlFalse) |
Replaces one displayer by another. More... | |
virtual void | setAbscissaGrid (IlvAbstractGridDisplayer *grid) |
Sets the abscissa grid. More... | |
virtual void | setAbscissaScale (IlvSingleScaleDisplayer *scale) |
Sets the abscissa scale. More... | |
void | setAxisCrossing (IlInt index, IlvAxisCrossing *) |
Specifies the crossing between coordinate axes. More... | |
void | setAxisCrossing (IlInt index, IlDouble val) |
Specifies the crossing between coordinate axes at a fixed value. More... | |
void | setCursorVisible (IlvAbstractChartCursor *cursor, IlBoolean visible) |
Shows or hides a cursor. More... | |
virtual void | setData (IlvAbstractChartData *data) |
Sets the chart data object that manages the data sets displayed by the current object. More... | |
void | setDrawOrder (IlvDrawOrder drawOrder) |
Sets the drawing order for all the scales and grids defined. More... | |
virtual void | setLayout (IlvChartLayout *layout) |
Sets the chart layout object. More... | |
void | setLegend (IlvChartLegend *legend) |
Sets the legend. More... | |
virtual void | setOrdinateGrid (IlUInt index, IlvAbstractGridDisplayer *grid) |
Adds or replaces an ordinate grid. More... | |
virtual void | setOrdinateScale (IlUInt index, IlvAbstractScaleDisplayer *scale) |
Adds or replaces an ordinate scale. More... | |
void | setProjectedPointsPalette (IlvPalette *palette) |
Sets the palette used to display the out-of-bounds data points that are projected. More... | |
void | setProjectHorizontally (IlBoolean projectHorizontally) |
Specifies whether there is a horizontal projection of out-of-bounds data points. More... | |
virtual IlBoolean | setProjector (IlvAbstractProjector *projector) |
Sets the projector. More... | |
void | setProjectVertically (IlBoolean projectVertically) |
Specifies whether there is a vertical projection of out-of-bounds data points. More... | |
void | setScrollMode (ScrollMode mode, IlBoolean createCursor=IlFalse) |
Sets the scrolling mode. More... | |
void | setScrollRatio (IlDouble ratio) |
Sets the scrolling ratio. More... | |
void | stackScales (IlUInt count, const IlvSingleScaleDisplayer *const *scales, IlDouble offsetRatio) |
Stack several ordinate scales. More... | |
virtual void | translateCharts (IlDouble deltaAbscissa, IlDouble deltaOrdinate, IlUInt ordinateAxisIndex=0, IlBoolean redraw=IlTrue, IlBoolean clipToAutoRange=IlTrue) |
Translates the graphical representations of data. More... | |
virtual void | update () |
Updates the current object. More... | |
void | updateAndReDraw () |
Updates and redraws the current object. More... | |
virtual IlBoolean | zoomCharts (const IlvCoordInterval &abscissaRange, IlBoolean redraw=IlTrue, IlBoolean clipToAutoRange=IlTrue) |
Zooms the graphical representations of data on the abscissa axis. More... | |
virtual IlBoolean | zoomCharts (const IlvCoordInterval &ordinateRange, IlUInt ordinateAxisIndex, IlBoolean redraw=IlTrue, IlBoolean clipToAutoRange=IlTrue) |
Zooms the graphical representations of data on an ordinate axis. More... | |
IlBoolean | zoomCharts (const IlvCoordInterval &abscissaRange, const IlvCoordInterval &ordinateRange, IlUInt ordinateAxisIndex=0, IlBoolean redraw=IlTrue, IlBoolean clipToAutoRange=IlTrue) |
Zooms the graphical representations of data. More... | |
Additional Inherited Members | |
Public Types inherited from IlvChartGraphic | |
enum | FillMode { FillNone, FillDataArea, FillGraphArea, FillDataAndGraphArea } |
Available chart fill modes. More... | |
enum | ScrollMode { IlvScrollModeStop, IlvScrollModeShift, IlvScrollModeCycle } |
Available scrolling modes. More... | |
Implementation of predefined Cartesian charts.
Library: ilvcharts
This class is a subclass of IlvChartGraphic
which allows you to display a Cartesian chart.
A Cartesian chart represents data in a standard way: the data are expressed in Cartesian coordinates (x, y). The abscissa and ordinate scales which represent the x-and y-coordinates, respectively, are orthogonal.
Example of a Cartesian chart:
IlvChartGraphic
. IlvCartesianChart::IlvCartesianChart | ( | IlvDisplay * | display, |
const IlvRect & | bbox, | ||
IlBoolean | useGrid = IlFalse , |
||
IlvCartesianProjector::Orientation | orientation = IlvCartesianProjector::IlvXRightYTop , |
||
IlvPalette * | palette = 0 , |
||
IlvPalette * | gridPalette = 0 |
||
) |
Constructor.
Initializes a new IlvCartesianChart
object. The constructor creates a Cartesian chart with two default scales. The associated projector is an instance of IlvCartesianProjector
and the scales are instances of IlvRectangularScaleDisplayer
.
display | The display connection that will handle the drawing of this object. |
bbox | The initial bounding box of the chart graphic. |
useGrid | A Boolean indicating whether grids should be added to the created scales. |
orientation | The orientation of the Cartesian projector. |
palette | The palette associated with the chart. |
gridPalette | The palette associated with the grids (meaningful only if useGrid is equal to IlTrue ). |
© Copyright 2015, 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.