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

10.5 Data Dragging

Objective Chart allows the user to interactively change data values by dragging a wiget, line end, or bar edge with the mouse.

Not all chart types support data dragging. The ability to drag data items is limited by the amount of information that SRGraphPosition can infer from the mouse position. For example, in pie charts you can not change the value of one data item without affecting other data items. In addition, the three- dimensional nature of the IsoBar, IsoArea, and IsoRibbon charts make it difficult to resolve mouse movements.

By default, SRGraphView assumes that it is being used with CGraphDoc in a Communication Document / SRGraphView system (see the Programmer's Guide.) Consequently, during data dragging SRGraphView::MouseDrag() issues SECComDoc messages that could be used to update data in the graph document or other communicating documents. If the view class is not used in an SECComDoc system (if the document is not based on CGraphDoc), these messages must be disabled or assertions may occur.

To use SRGraphView or SRGScrollView without a CGraphDoc:

  1. Override the GetGraph() function to return a pointer to the SRGraph object, wherever it is stored.

  2. Call SetHasDocument(FALSE) in the view constructor to disable the CommDoc feature.


    SREGraphView and SREScrollView implement GetGraph() and SetHasDocument(FALSE) by default even though the m_pGraph pointer must be set explicitly in your derived class.

To enable the display of chart tips while dragging a data item, call SetDragTips(TRUE) in the constructor or OnInitialUpdate() function of the view 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.