Using the Charts Library > Data Display > Using Single Displayers > Bar Displayer
 
Bar Displayer
A bar displayer has the following basic characteristics:
Class
Category
Single
Number of real data sets displayed
1
Can be used with all types of projections
Yes
Items drawn
Bars
The following property is specific to a bar displayer:
Property
Methods
Default Value
Width of a Bar
getWidth
setWidth
IlvChartDisplayerWidth
Width Percentage of a Bar
getWidthPercent
setWidthPercent
100
If a width percentage is set, the width of the bars is no longer constant but proportional to the zoom level of the chart.
Figure 8.8 illustrates the fact that a bar displayer can be used with all types of projections. Data sets are represented by bar displayers in a Cartesian chart (using a Cartesian projection) and in a polar chart (using a polar projection).
Figure 8.8    Bar Displayers in a Cartesian Chart and in a Polar Chart
We can use the bar displayer displaying the gold bars as an example. We can create this displayer by using the following code:
IlvBarChartDisplayer* displayer =
new IlvBarChartDisplayer(IlvChartDisplayerWidth);
displayer->setForeground(dpy->getColor(“red”));
displayer->setBackground(dpy->getColor(“gold”));
Note: By default, the bars are outlined with the foreground color and filled with the background color the defined palette. They will be displayed only with the outline if the Drawn Filled property is set to IlvFalse.

Version 5.5.1
Copyright © 2012, Rogue Wave Software, Inc. All Rights Reserved.