Views
Charts Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
IlvChartDataInteractor Class Reference

Abstract base class for chart data manipulation. More...

#include <ilviews/charts/chartint.h>

Inheritance diagram for IlvChartDataInteractor:
IlvChartInteractor IlvInteractor IlvChartDragPointInteractor IlvChartHighlightPointInteractor IlvChartSelectInteractor IlvChartInfoViewInteractor

Public Types

enum  PickingMode
 

Public Member Functions

PickingMode getPickingMode () const
 Returns the current picking mode of the interactor. More...
 
void setPickingMode (PickingMode m)
 Sets the current picking mode of the interactor. More...
 
- Public Member Functions inherited from IlvChartInteractor
virtual void endSequence (IlvChartGraphic *chart, const IlvEvent &event, const IlvTransformer *t)
 Performs the actions needed when an interactor leaves an event sequence. More...
 
virtual IlBoolean handleEvent (IlvGraphic *chart, IlvEvent &event, const IlvTransformer *t=0)=0
 Handles events received by the interactor. More...
 
IlBoolean isShared () const
 Indicates whether the current object is a shared instance. More...
 
virtual IlBoolean isShowingAbscissaCursor () const
 Indicates whether the interactor uses a cursor on the abscissa. More...
 
virtual IlBoolean isShowingOrdinateCursor () const
 Indicates whether the interactor uses a cursor on the ordinate. More...
 
virtual void startSequence (IlvChartGraphic *chart, const IlvEvent &event, const IlvTransformer *t)
 Performs the actions needed when an interactor enters an event sequence. More...
 

Static Public Member Functions

static IlvDim GetPrecision ()
 Returns the precision used to find the data point corresponding to a given screen point. More...
 
static void SetPrecicion (IlvDim dim)
 Deprecated misspelling of SetPrecision()
 
static void SetPrecision (IlvDim dim)
 Sets the precision used to find the data point corresponding to a given screen point. More...
 
- Static Public Member Functions inherited from IlvChartInteractor
static IlvChartInteractorGet (const char *name)
 Returns a shared interactor instance. More...
 

Protected Member Functions

 IlvChartDataInteractor ()
 Constructor. More...
 
IlvChartDataSetgetHandledDataSet () const
 Returns the handled data set. More...
 
IlvAbstractChartDisplayergetHandledDisplayer () const
 Returns the chart displayer representing the handled data. More...
 
IlUInt getHandledPointIndex () const
 Returns the index of the handled data point. More...
 
IlBoolean isHandlingData () const
 Checks whether valid information about a data point has been stored. More...
 
virtual IlBoolean queryData (IlvChartGraphic *chart, IlvPoint &evp, const IlvTransformer *t)
 Retrieves and stores information about a data point. More...
 
- Protected Member Functions inherited from IlvChartInteractor
 IlvChartInteractor ()
 Constructor. More...
 

Detailed Description

Abstract base class for chart data manipulation.

Library: ilvcharts

This class provides an interface for querying and storing information about the data point corresponding to a given event location in the chart data area.

Member Enumeration Documentation

◆ PickingMode

The picking mode defines how a data point is retrieved by the queryData() method.

ItemPicking: this method takes into account the whole displayed item (like a bar for instance).

NearestPointPicking: only the projected data point is taken into account.

Constructor & Destructor Documentation

◆ IlvChartDataInteractor()

IlvChartDataInteractor::IlvChartDataInteractor ( )
protected

Constructor.

Initializes a new IlvChartDataInteractor object.

Member Function Documentation

◆ getHandledDataSet()

IlvChartDataSet* IlvChartDataInteractor::getHandledDataSet ( ) const
protected

Returns the handled data set.

Returns
The handled data set.

◆ getHandledDisplayer()

IlvAbstractChartDisplayer* IlvChartDataInteractor::getHandledDisplayer ( ) const
protected

Returns the chart displayer representing the handled data.

Returns
The chart displayer representing the handled data.

◆ getHandledPointIndex()

IlUInt IlvChartDataInteractor::getHandledPointIndex ( ) const
protected

Returns the index of the handled data point.

Returns
The index of the handled data point.

◆ getPickingMode()

PickingMode IlvChartDataInteractor::getPickingMode ( ) const

Returns the current picking mode of the interactor.

See also
PickingMode

◆ GetPrecision()

static IlvDim IlvChartDataInteractor::GetPrecision ( )
static

Returns the precision used to find the data point corresponding to a given screen point.

Returns
The precision used to find the data point corresponding to a given screen point.
Note
The returned value indicates the maximum distance that is considered from a given view point to find the nearest displayed data point. The precision is set by default to the value returned by the IlvGetDeltaLine() function.

◆ isHandlingData()

IlBoolean IlvChartDataInteractor::isHandlingData ( ) const
protected

Checks whether valid information about a data point has been stored.

Returns
IlTrue if valid information about a data point has been stored.

◆ queryData()

virtual IlBoolean IlvChartDataInteractor::queryData ( IlvChartGraphic chart,
IlvPoint evp,
const IlvTransformer t 
)
protectedvirtual

Retrieves and stores information about a data point.

Given an event location, the closest projected data point is retrieved from the chart. This method stores the following information about the considered data point:

  • The chart displayer representing this data point
  • The data series
  • The index of the data point in the series
Parameters
chartThe considered chart.
evpThe event location in view coordinates.
tThe transformer applied to the view in which the event occurred.
Returns
IlTrue if a data point projection was near the event location.
See also
getHandledDisplayer, getHandledDataSet, getHandledPointIndex.

◆ setPickingMode()

void IlvChartDataInteractor::setPickingMode ( PickingMode  m)

Sets the current picking mode of the interactor.

See also
PickingMode

◆ SetPrecision()

static void IlvChartDataInteractor::SetPrecision ( IlvDim  dim)
static

Sets the precision used to find the data point corresponding to a given screen point.

The precision used to find the data point corresponding to a given screen point is set to dim.

Note
This value indicates the maximum distance that is considered from a given view point to find the nearest displayed data point. The precision is set by default to the value returned by the IlvGetDeltaLine() function.