December 2002
Intermediate to advanced
400 pages
9h 25m
English
Earlier in Chapter 15, we saw how the PieChart class inherits from GraphItem, and after instantiation, it is made visible by passing its reference across to SimpleGraph. We will now use an identical design pattern to create and display a bar chart using the SimpleBar and MultiBar classes. We will create an architecture by which all the bars presented are a specific instance of the SimpleBar class. The bars will then be consolidated and presented through functionality made available by the MultiBar class. Using this design enables us to have low-level control over the individual bars, and a mechanism to easily obtain their data values and change their visual settings.
The code required for the constructor method of the SimpleBar class ...