Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Class for high-low open-close displayers. More...
#include <ilviews/charts/hilo.h>
Public Member Functions | |
IlvHiLoOpenCloseChartDisplayer (IlvDim width=8, IlvPalette *hiLoRisePal=0, IlvPalette *openCloseRisePal=0, IlvPalette *hiLoFallPal=0, IlvPalette *openCloseFallPal=0, IlvChartDisplayerFactory *factory=0) | |
Constructor. | |
IlvHiLoChartDisplayer * | getHiLoDisplayer () const |
Returns the child displayer that displays the low-values and high-values data sets. | |
IlvHiLoChartDisplayer * | getOpenCloseDisplayer () 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 IlvAbstractChartDisplayer * | createDisplayer (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. |
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).
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.
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. |
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).
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.
IlvHiLoChartDisplayer* IlvHiLoOpenCloseChartDisplayer::getOpenCloseDisplayer | ( | ) | const |
Returns 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.
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.
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.
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.
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.
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.
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.
IlFalse
by default. Reimplemented from IlvAbstractChartDisplayer.
© 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.