rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliChartGraphic Class Reference

A chart class. More...

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

List of all members.

Public Member Functions

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

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:
display The display.
bbox The bounding box.
palette The 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:
name The column name.
dsi The 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:
msg The error message.
IlInt IliChartGraphic::getColumnCount ( IlInt  dsi = 0  )  const

Returns the column count.

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

Returns a column name.

Parameters:
pos The column position.
dsi The 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:
index The 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:
index The 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:
type The model type.
Returns:
The count.
IlInt IliChartGraphic::getModelPropertyIndex ( IliChartModelType  type,
const char *  name 
) const

Returns a model property index.

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

Returns a model property name.

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

Returns a model property value.

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

Returns a model property value.

Parameters:
type The model type.
name The property name.
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:
sink The 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:
errorlist The 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:
count The column count.
dsi The data source index.
void IliChartGraphic::setColumnName ( const char *  name,
IlInt  pos,
IlInt  dsi = 0 
)

Sets a column name.

Parameters:
name The column name.
pos The column position.
dsi The 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:
name The model name. The predefined models are: IliChartRowDataModel, IliChartDSDataModel, IliChartColumnDataModel
void IliChartGraphic::setDataSource ( IliDataSource ds,
IlInt  index = 0 
)

Sets a data source.

Parameters:
ds The data source.
index The 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:
count The data source count.
void IliChartGraphic::setDataSourceName ( const char *  name,
IlInt  index = 0 
)

Sets a data source name.

Parameters:
name The data source name.
index The 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:
disp The 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:
reporter The new error reporter.
void IliChartGraphic::setModelPropertyValue ( IliChartModelType  type,
IlInt  index,
const IliValue val 
)

Sets a model property value.

Parameters:
type The model type.
index The property index.
val The value.
void IliChartGraphic::setModelPropertyValue ( IliChartModelType  type,
const char *  name,
const IliValue val 
)

Sets a model property value.

Parameters:
type The model type.
name The property name.
val The value.
void IliChartGraphic::setSeriesModelName ( const char *  name  ) 

Sets the series model name.

Parameters:
name The 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.