rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvHiLoOpenCloseChartDisplayer Class Reference

Class for high-low open-close displayers. More...

#include <ilviews/charts/hilo.h>

Inheritance diagram for IlvHiLoOpenCloseChartDisplayer:
IlvCompositeChartDisplayer IlvAbstractChartDisplayer

List of all members.

Public Member Functions

 IlvHiLoOpenCloseChartDisplayer (IlvDim width=8, IlvPalette *hiLoRisePal=0, IlvPalette *openCloseRisePal=0, IlvPalette *hiLoFallPal=0, IlvPalette *openCloseFallPal=0, IlvChartDisplayerFactory *factory=0)
 Constructor.
IlvHiLoChartDisplayergetHiLoDisplayer () const
 Returns the child displayer that displays the low-values and high-values data sets.
IlvHiLoChartDisplayergetOpenCloseDisplayer () const
 Returns the child displayer that displays the open-values and close-values data sets.
IlUInt getWidthPercent () const
 Returns the width percentage of the high-low items.
void setHiLoFallPalette (IlvPalette *pal)
 Sets the fall palette used to display the low-values and high-values data sets.
void setHiLoRisePalette (IlvPalette *pal)
 Sets the rise palette used to display the low-values and high-values data sets.
void setOpenCloseFallPalette (IlvPalette *pal)
 Sets the fall palette used to display the open-values and close-values data sets.
void setOpenCloseRisePalette (IlvPalette *pal)
 Sets the rise palette used to display the open-values and close-values data sets.
void setWidthPercent (IlUInt width)
 Sets the width percentage of the high-low items.
virtual IlBoolean useVirtualDataSets () const
 Indicates whether the current displayer uses virtual data sets.

Protected Member Functions

virtual IlvAbstractChartDisplayercreateDisplayer (IlUInt, IlvPalette *=0)
 Defines the child displayers that will be created by default to compose the current displayer.
virtual void updateDisplayers ()
 Updates the displayers that compose the current displayer.

Detailed Description

Class for high-low open-close displayers.

Library: ilvcharts

This class is a subclass of IlvCompositeChartDisplayer which allows you to represent data with both high-low items composed of segments and high-low items that are bars.

The high-low open-close displayer is a composite displayer that is composed of a high-low displayer (see the IlvHiLoChartDisplayer class) and a high-low bar displayer (see the IlvHiLoBarChartDisplayer class).

The high-low open-close displayer displays four data sets. The first data set is composed of the low values, the second data set is composed of the high values, the third data set is composed of the open values, and the fourth data set is composed of the close values. The first two data sets are displayed by the first child displayer that is a high-low displayer (instance of the IlvHiLoChartDisplayer class). The next two data sets are displayed by the second child displayer that is a high-low bar displayer (instance of the IlvHiLoBarChartDisplayer class).

This displayer can be used with any type of projection. (See the IlvAbstractProjector class for more details.)

The following images show data sets represented with a high-low open-close displayer in a Cartesian chart (on the left) and a polar chart (on the right).

img_hiloopenclose.gif
img_hiloopenclose_polar.gif
See also:
IlvCompositeChartDisplayer, IlvHiLoChartDisplayer, IlvHiLoBarChartDisplayer.

Constructor & Destructor Documentation

IlvHiLoOpenCloseChartDisplayer::IlvHiLoOpenCloseChartDisplayer ( IlvDim  width = 8,
IlvPalette hiLoRisePal = 0,
IlvPalette openCloseRisePal = 0,
IlvPalette hiLoFallPal = 0,
IlvPalette openCloseFallPal = 0,
IlvChartDisplayerFactory factory = 0 
)

Constructor.

Initializes a new IlvHiLoOpenCloseChartDisplayer object. The constructor creates the child displayers that compose the current composite displayer by calling the IlvCompositeChartDisplayer::initDisplayers method. The child displayers that are created by default are: a high-low displayer instance of the IlvHiLoChartDisplayer class and a high-low bar displayer instance of the IlvHiLoBarChartDisplayer class. However, the constructor allows you to specify if desired the displayer factory that will be used to create the child displayers. All the displayers inherited from the IlvHiLoChartDisplayer class can be used as child displayers for the current composite displayer.

Parameters:
width The width of the high-low items for the child displayers.
hiLoRisePal The rise palette used to display the low-values and high-values data sets.
openCloseRisePal The rise palette used to display the open-values and close-values data sets.
hiLoFallPal The fall palette used to display the low-values and high-values data sets.
openCloseFallPal The fall palette used to display the open-values and close-values data sets.
factory An optional factory to create the child displayers.
See also:
IlvChartDisplayerFactory, IlvCompositeChartDisplayer::setDisplayerFactory.

Member Function Documentation

virtual IlvAbstractChartDisplayer* IlvHiLoOpenCloseChartDisplayer::createDisplayer ( IlUInt  ,
IlvPalette = 0 
) [protected, virtual]

Defines the child displayers that will be created by default to compose the current displayer.

This method creates an instance of IlvHiLoChartDisplayer if index is equal to 0 and an instance of IlvHiLoBarChartDisplayer if index is equal to 1. (See the IlvCompositeChartDisplayer::createDisplayer method for more details).

Parameters:
index The index at which the created displayer will be added later to the collection of displayers that compose the current displayer.
palette The palette that will be used by the new displayer.

Reimplemented from IlvCompositeChartDisplayer.

IlvHiLoChartDisplayer* IlvHiLoOpenCloseChartDisplayer::getHiLoDisplayer (  )  const

Returns the child displayer that displays the low-values and high-values data sets.

Returns:
A pointer to the child displayer that displays the low-values and high-values data sets.
IlvHiLoChartDisplayer* IlvHiLoOpenCloseChartDisplayer::getOpenCloseDisplayer (  )  const

Returns the child displayer that displays the open-values and close-values data sets.

Returns:
A pointer to the child displayer that displays the open-values and close-values data sets.
IlUInt IlvHiLoOpenCloseChartDisplayer::getWidthPercent (  )  const

Returns the width percentage of the high-low items.

Returns:
The width percentage of the high-low items.
void IlvHiLoOpenCloseChartDisplayer::setHiLoFallPalette ( IlvPalette pal  ) 

Sets the fall palette used to display the low-values and high-values data sets.

The old palette, if one exists, is unlocked and the new palette is locked.

Parameters:
pal The new fall palette that is used to display the low-values and high-values data sets.
void IlvHiLoOpenCloseChartDisplayer::setHiLoRisePalette ( IlvPalette pal  ) 

Sets the rise palette used to display the low-values and high-values data sets.

The old palette, if one exists, is unlocked and the new palette is locked.

Parameters:
pal The new rise palette that is used to display the low-values and high-values data sets.
void IlvHiLoOpenCloseChartDisplayer::setOpenCloseFallPalette ( IlvPalette pal  ) 

Sets the fall palette used to display the open-values and close-values data sets.

The old palette, if one exists, is unlocked and the new palette is locked.

Parameters:
pal The new fall palette that is used to display the open-values and close-values data sets.
void IlvHiLoOpenCloseChartDisplayer::setOpenCloseRisePalette ( IlvPalette pal  ) 

Sets the rise palette used to display the open-values and close-values data sets.

The old palette, if one exists, is unlocked and the new palette is locked.

Parameters:
pal The new rise palette that is used to display the open-values and close-values data sets.
void IlvHiLoOpenCloseChartDisplayer::setWidthPercent ( IlUInt  width  ) 

Sets the width percentage of the high-low items.

The width of the high-low items will be computed as a percentage of the available space between two abscissa points. Therefore, the items width will grow along if the chart is enlarged or if the visible range is reduced.

Parameters:
width The width percentage, between 0 and 100 .
virtual void IlvHiLoOpenCloseChartDisplayer::updateDisplayers (  )  [protected, virtual]

Updates the displayers that compose the current displayer.

This method sets the data sets used by the current displayer (that is the low-values, the high-values, the open-values and the close-values data sets) on the child displayers that compose the current displayer (that is the high-low and the high-low bar displayers).

See the IlvCompositeChartDisplayer::updateDisplayers method for more details.

Reimplemented from IlvCompositeChartDisplayer.

virtual IlBoolean IlvHiLoOpenCloseChartDisplayer::useVirtualDataSets (  )  const [virtual]

Indicates whether the current displayer uses virtual data sets.

Returns a Boolean that indicates whether the current displayer uses virtual data sets.

Returns:
IlFalse by default.

Reimplemented from IlvAbstractChartDisplayer.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.