Objective Chart : PART II Programmer’s Guide : Chapter 18 Compound Component System : Recap of Principles
Recap of Principles
Objective Chart uses a list of components to create the graphics that make up a chart. The top-level components like SRGraphDisplay and SRGraphTitle are stored on the m_ComponentList member of the main SRGraph object and are drawn in sequence to create simple or complex chart images.
Consider for a moment the SRGraphDisplay component. It is the entity that performs all the tasks of drawing axes, grid lines, tick marks, data objects, and everything else that makes up the chart display. During its draw cycle, SRGraphDisplay uses other components such as SRGDecimalScale as variables that are only accessible to itself and classes derived from SRGraphDisplay.
This means that to create a completely customized chart — one that adds a different style of axis labeling for example, you need to override the SRGraphDisplay class. In your override, you can use and modify the sub-components contained therein. The sub-components themselves are drawn by the display actually calling the Draw() function for them, so your extension must emulate this behavior too.