Perhaps the most significant way to increase display speed is to turn off feedback logging. Creating an SRGraphFeedback for each data item on screen takes as much time as drawing them in some cases.
Of course, turning off feedback logging disables data dragging and chart tips. However, the features relating to individual data items are infrequently used in charts with large amounts of data.
To disable feedback logging, call SRGraph::SetFeedbackLogging(FALSE).
For charts that must hold a lot of data and still have feedback enabled, we recommend that feedback be disabled when a chart is not zoomed and only enabled when zooming reduces the density of data to a manageable level. This could be managed at the display draw level.
Override SRGraphDisplay and modify the DrawData() routine as follows.
CMyDisplay::DrawData() { BOOL bFeedback=GetParent()->GetFeedbackLogging(); if(m_nDivCount<500) // add your own limit here GetParent()->SetFeedbackLogging(TRUE); // else //optional // GetParent()->SetFeedbackLogging(FALSE); SRGraphDisplay::DrawData(); GetParent()->SetFeedbackLogging(bFeedback); } |
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.