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

25.1 Adding Custom Text or Graphics

You can add custom text or graphics to a chart created with Objective Grid. For example, the control limits can be drawn on a control chart using the axis scaling of the display. Another example would be drawing a smooth curve from a formula for comparison with observed data without generating hundreds of SRGraphData objects.

Such custom graphics can be added to the OnDraw() function after DrawComponentList(). After the chart has been drawn, the display rectangle and axis scaling parameters are available. If the graph and axis type are fixed, the drawing code can be quite simple.

The code below draws a line indicating the y-axis value of 105. A classic axis with linear scaling is assumed.

The SRGraph functions DrawingUsing() and NotDrawing() are used along with similarly named functions in the component classes to enable the use of the chart and component drawing and positioning functions outside of DrawComponentList() processing.

The following code segment illustrates how these functions can be used to draw a wiget.



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.