rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IliChartGraphic Class Reference

A chart class. More...

#include <ilviews/dataccess/gadgets/chartgraphic.h>

Inherits IlvChartGraphic.

Public Member Functions

 IliChartGraphic (IlvDisplay *display, const IlvRect &bbox, IlvPalette *palette=0)
 Constructor of the IliChartGraphic class. More...
 
void addColumnName (const char *name, IlInt dsi=0)
 Adds a column name. More...
 
void addErrorSink (IliErrorSink *sink)
 Forwards an error message to all the error sinks that have been added with the addErrorSink member function. More...
 
IlInt getColumnCount (IlInt dsi=0) const
 Returns the column count. More...
 
const char * getColumnName (IlInt pos, IlInt dsi=0) const
 Returns a column name. More...
 
IliChartDataModelgetDataModel () const
 Returns the data model. More...
 
const char * getDataModelName () const
 Returns the data model name. More...
 
IliDataSourcegetDataSource (IlInt index=0)
 Returns a data source. More...
 
IlInt getDataSourceCount () const
 Returns the data source count. More...
 
const char * getDataSourceName (IlInt index=0) const
 Returns a data source name. More...
 
IlvAbstractChartDisplayer * getDefaultDisplayer () const
 Returns the default displayer. More...
 
IliErrorReportergetErrorReporter () const
 Returns the error reporter that is used by the reportErrors member functions. More...
 
IlInt getModelPropertyCount (IliChartModelType type) const
 Returns the model property count. More...
 
IlInt getModelPropertyIndex (IliChartModelType type, const char *name) const
 Returns a model property index. More...
 
const char * getModelPropertyName (IliChartModelType type, IlInt index) const
 Returns a model property name. More...
 
const IliValuegetModelPropertyValue (IliChartModelType type, const char *name) const
 Returns a model property value. More...
 
const IliValuegetModelPropertyValue (IliChartModelType type, IlInt index) const
 Returns a model property value. More...
 
IliChartSeriesModelgetSeriesModel () const
 Returns the series model. More...
 
const char * getSeriesModelName () const
 Returns the series model name. More...
 
void removeErrorSink (IliErrorSink *sink)
 Removes an error sink from this table gadget. More...
 
void reportErrors (const IliErrorList &) const
 Reports the errors that are contained in a error list. More...
 
void setColumnCount (IlInt count, IlInt dsi=0) const
 Sets the column count. More...
 
void setColumnName (const char *name, IlInt pos, IlInt dsi=0)
 Sets a column name. More...
 
void setDataModelName (const char *name)
 Sets the data model name. More...
 
void setDataSource (IliDataSource *ds, IlInt index=0)
 Sets a data source. More...
 
void setDataSourceCount (IlInt count)
 Sets the data source count. More...
 
void setDataSourceName (const char *name, IlInt index=0)
 Sets a data source name. More...
 
void setDefaultDisplayer (IlvAbstractChartDisplayer *disp)
 Sets the default displayer. More...
 
void setErrorReporter (IliErrorReporter *reporter)
 Sets the error reporter. More...
 
void setModelPropertyValue (IliChartModelType type, const char *name, const IliValue &val)
 Sets a model property value. More...
 
void setModelPropertyValue (IliChartModelType type, IlInt index, const IliValue &val)
 Sets a model property value. More...
 
void setSeriesModelName (const char *name)
 Sets the series model name. More...
 

Detailed Description

A chart class.

Library: dbchart

The class defines a chart graphic which can be connected to one or several data sources. The number of data sources and columns depend on the data model. By default, three data models are provided:

However, you can define your own data model. This classes uses another model type, the series model. This model type, is used to compute the properties of the new series. The computed properties are:

Note: The inspector of this class has two limitations:

See Also
IliChartDataModel, IliChartSeriesModel.

Constructor & Destructor Documentation

IliChartGraphic::IliChartGraphic ( IlvDisplay display,
const IlvRect bbox,
IlvPalette palette = 0 
)

Constructor of the IliChartGraphic class.

Initializes an IliChartGraphic object. This class can be used to connect a data source to chart graphic.

Parameters
displayThe display.
bboxThe bounding box.
paletteThe palette.

Member Function Documentation

void IliChartGraphic::addColumnName ( const char *  name,
IlInt  dsi = 0 
)

Adds a column name.

This function works fine when the data model allows this operation.

Parameters
nameThe column name.
dsiThe data source index.
void IliChartGraphic::addErrorSink ( IliErrorSink sink)

Forwards an error message to all the error sinks that have been added with the addErrorSink member function.

Parameters
msgThe error message.
IlInt IliChartGraphic::getColumnCount ( IlInt  dsi = 0) const

Returns the column count.

Parameters
dsiThe data source index.
Returns
The column count.
const char* IliChartGraphic::getColumnName ( IlInt  pos,
IlInt  dsi = 0 
) const

Returns a column name.

Parameters
posThe column position.
dsiThe data source index.
Returns
The column name or 0 if the indexes are invalid.
IliChartDataModel* IliChartGraphic::getDataModel ( ) const

Returns the data model.

Returns
The data model.
const char* IliChartGraphic::getDataModelName ( ) const

Returns the data model name.

Returns
The model name.
IliDataSource* IliChartGraphic::getDataSource ( IlInt  index = 0)

Returns a data source.

Parameters
indexThe data source index.
Returns
The data source if the index parameter is valid, otherwise returns 0
IlInt IliChartGraphic::getDataSourceCount ( ) const

Returns the data source count.

Returns
The count.
const char* IliChartGraphic::getDataSourceName ( IlInt  index = 0) const

Returns a data source name.

Parameters
indexThe data source index.
Returns
The data source name if the index parameter is valid, otherwise returns 0
IlvAbstractChartDisplayer* IliChartGraphic::getDefaultDisplayer ( ) const

Returns the default displayer.

Returns
The displayer.
IliErrorReporter* IliChartGraphic::getErrorReporter ( ) const

Returns the error reporter that is used by the reportErrors member functions.

When this property is NULL a default error reporter is used. Initially this property is NULL.

Returns
The error reporter.
IlInt IliChartGraphic::getModelPropertyCount ( IliChartModelType  type) const

Returns the model property count.

Parameters
typeThe model type.
Returns
The count.
IlInt IliChartGraphic::getModelPropertyIndex ( IliChartModelType  type,
const char *  name 
) const

Returns a model property index.

Parameters
typeThe model type.
nameThe property name.
Returns
The index if found, otherwise -1.
const char* IliChartGraphic::getModelPropertyName ( IliChartModelType  type,
IlInt  index 
) const

Returns a model property name.

Parameters
typeThe model type.
indexThe property index.
Returns
The name if index valid, otherwise 0.
const IliValue& IliChartGraphic::getModelPropertyValue ( IliChartModelType  type,
const char *  name 
) const

Returns a model property value.

Parameters
typeThe model type.
nameThe property name.
Returns
The value if found otherwise a null value.
const IliValue& IliChartGraphic::getModelPropertyValue ( IliChartModelType  type,
IlInt  index 
) const

Returns a model property value.

Parameters
typeThe model type.
indexThe property index.
Returns
The value if found otherwise a null value.
IliChartSeriesModel* IliChartGraphic::getSeriesModel ( ) const

Returns the series model.

Returns
The series model.
const char* IliChartGraphic::getSeriesModelName ( ) const

Returns the series model name.

Returns
The model name.
void IliChartGraphic::removeErrorSink ( IliErrorSink sink)

Removes an error sink from this table gadget.

Parameters
sinkThe error sink.
void IliChartGraphic::reportErrors ( const IliErrorList ) const

Reports the errors that are contained in a error list.

This member function makes use of the error reporter returned by getErrorReporter if any. Otherwise it uses a default error reporter.

Parameters
errorlistThe error list.
void IliChartGraphic::setColumnCount ( IlInt  count,
IlInt  dsi = 0 
) const

Sets the column count.

This function works fine when the data model allows this operation.

Parameters
countThe column count.
dsiThe data source index.
void IliChartGraphic::setColumnName ( const char *  name,
IlInt  pos,
IlInt  dsi = 0 
)

Sets a column name.

Parameters
nameThe column name.
posThe column position.
dsiThe data source index.
void IliChartGraphic::setDataModelName ( const char *  name)

Sets the data model name.

When you change the data model name, the data source name and the column name are erased.

Parameters
nameThe model name. The predefined models are: IliChartRowDataModel, IliChartDSDataModel, IliChartColumnDataModel
void IliChartGraphic::setDataSource ( IliDataSource ds,
IlInt  index = 0 
)

Sets a data source.

Parameters
dsThe data source.
indexThe data source index.
void IliChartGraphic::setDataSourceCount ( IlInt  count)

Sets the data source count.

If the data model has a data source count fixed, this function do nothing. If the data source count is changed, all columns are erased.

Parameters
countThe data source count.
void IliChartGraphic::setDataSourceName ( const char *  name,
IlInt  index = 0 
)

Sets a data source name.

Parameters
nameThe data source name.
indexThe data source index.
void IliChartGraphic::setDefaultDisplayer ( IlvAbstractChartDisplayer *  disp)

Sets the default displayer.

The default displayer is used to create a displayer for new series without displayer. The default displayer is deleted by the IliChartGraphic class. The color of the default displayer is ignored by the chart graphic. It is computed by the current series model.

Parameters
dispThe default displayer.
void IliChartGraphic::setErrorReporter ( IliErrorReporter reporter)

Sets the error reporter.

Note that the table gadget will not delete the error reporter at destruction time, so the same error reporter may be safely shared by many table gadgets.

Parameters
reporterThe new error reporter.
void IliChartGraphic::setModelPropertyValue ( IliChartModelType  type,
const char *  name,
const IliValue val 
)

Sets a model property value.

Parameters
typeThe model type.
nameThe property name.
valThe value.
void IliChartGraphic::setModelPropertyValue ( IliChartModelType  type,
IlInt  index,
const IliValue val 
)

Sets a model property value.

Parameters
typeThe model type.
indexThe property index.
valThe value.
void IliChartGraphic::setSeriesModelName ( const char *  name)

Sets the series model name.

Parameters
nameThe model name. The predefined model is IliChartSeriesModel.

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