December 2002
Intermediate to advanced
400 pages
9h 25m
English
All the code described so far in this chapter is centered on the creation of a class that defines a single bar or data value, so how are all these individual bars consolidated together and displayed in a graph? Well, there are two possible approaches: We can either display each SimpleBar as an individual object on the SimpleGraph container, or we can use the MultiBar class to present like bars together.
The MultiBar class provides functionality to iterate through a number of SimpleBar classes, and make each bar visible against an appropriate axis scale. The code required in the {constructor} for MultiBar is shown in Figure 17-13.
As the MultiBar class will actually render the bars that will be displayed to the user, it inherits from ...