Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Chart User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

9.3 Objective Chart Wizard

In addition to the Chart Editor, the Chart Wizard allows the user to modify chart settings. Chart Wizard allows new components to be added and changed interactively. The results of changes are displayed immediately in a view window. The user can easily experiment with various chart and axis types to determine the best combination for representing his data.

9.3.1 Chart Wizard Features

The Chart Wizard can help the developer or end user create a chart from scratch or it can reconfigure an existing chart. Figure 123 shows the Chart Layout page of the Wizard, while Figure 124 shows the layout preview window.

If the SRGraph object passed to the Wizard has an empty component list, The Wizard displays the Chart Layout page. The user selects a basic chart layout from a number of choices, and the Wizard adds components to the chart accordingly. Then, the user selects an initial graph type for the display. The newly configured chart is displayed in a view window as it will appear in your application. Obviously, the display component looks best if the chart contains some data that it can graph. The Wizard can either copy the data in original SRGraph object or it can use its own arbitrary data set.

Figure 123: Chart Wizard layout selection

Figure 124: Chart Wizard layout preview

After the initial chart configuration, the Advanced editing pages are presented. These are the initial pages shown if the original SRGraph object has components in its list.

Figure 125 shows the General property page for the display component and Figure 126 shows the chart view window.

Figure 125: Chart Wizard in action - modifying the component list of a graph

Figure 126: Chart view window

The Advanced pages can be used to interactively configure a graph. Components can be added or removed from the component list. Multiple SRGraphDisplay, SRGraphTitle, SRGraphBackground, SRGTextPanel, and SRGraphLegend components can be added. The SRGCompoundDisplay component is not supported.

The commonly used styles of these components can be modified by the Wizard. The effects of changing a check box status or making a selection from a list box are displayed immediately. Entries into edit boxes are realized when the Apply button is clicked. The Wizard is instructive because it readily shows the effect of the various style settings on the chart.

When you are satisfied with the chart, you can then dismiss the Wizard and save your newly enhanced graph. The graph object that the Wizard modifies and displays is actually a copy of your original. No changes you make inside the Wizard apply to your graph until you explicitly call the SaveGraph() function of the SRGWizSheet class after you dismiss the Wizard dialog.

The data values can be changed by dragging with the mouse. You can determine whether or not the changed data is saved to your graph by specifying a parameter of SaveGraph().

9.3.2 Using Chart Wizard

The Chart Wizard is included in the Objective Chart library. The Wizard consists of several classes derived from CPropertyPage and CPropertySheet. It is used just like a dialog or a property sheet class. In most cases, the SRGWizSheet class is the only class you have to work with.

To use the Chart Wizard in your application:

The first line creates an SRGWizSheet object and passes it a reference to a preexisting graph object and a caption for the property sheet. The SRGWizSheet constructor has several optional parameters.

SRGWizSheet::SRGWizSheet(SRGraph* pGraph, LPCTSTR pszCaption, 
                           CWnd* pParentWnd, UINT iSelectPage, 
                           CSize viewSize, BOOL bUseGraphData)

9.3.3 Chart Wizard Property Pages

The Advanced section of the Wizard consists of four property pages: General setup, Fill style, Font style, and Misc. The first three pages have a combo box that lets you select a component (from a list of components in the graph) for modification.

The General setup page lets you set the measurement mode, component rectangle, border style, and shadow style. Table 19 shows the additional options that can be modified for selected components. The best combination of chart and axis types for representing your data can be quickly determined.

Table 19: Chart Wizard Advanced Section -- General Chart Properties

Component type Additional features that can be modified
Background None
Title Chart title
Text Panel Body and title text, Title orientation, Use Title flag, Body resize flag
Display Data scope and Relative Index flag, Chart type and Axis type, Always show zero flag, flags to enable tick marks and grid lines, Use Max Size flag and Max Size (MaxObjectWidth) – sets max width of bars, bubbles, and vectors
Legend Legend style, Key style, Key size, Key first flag, RCLock flag and the number of rows and columns

The Fill style page determines how the background of the selected component is filled. You can choose a solid color, a horizontal, vertical or angled vignette (a gradient of colors across the area), or a bitmap image. For vignettes, the starting (top) and ending (bottom) colors can be selected. Bitmap images can come from the project's resources or a file on disk. Enter the resource name or file path in the provided edit box. The images can be in bitmap, DIB, or JPEG format.

The Font style page determines how text appears in the selected component.

9.3.4 Chart Wizard User Interactions

The following user interactions are supported within the chart view window if the actions are enabled in the chart object:

9.3.5 Customizing Chart Wizard

If you come up with a chart layout that you would like to reuse, the layout (component sizes and positions) can be appended to a text file. Then you can override SRGWizSheet::LoadCustomLayout() to add your new layouts to the Wizard's selection list.

If you have created your own graph type or axis type, you can add your custom types to the wizard's selection lists. You have to override the LoadCustomGraphType()and LoadCustomStandChart() or LoadCustomAxisType() functions of the SRGWizSheet class.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.