ChartDirector 7.1 (C++ Edition)

CChartViewer.updateViewPort


Usage

void updateViewPort(bool needUpdateChart, bool needUpdateImageMap);

Description

Triggers the CVN_ViewPortChanged message.

CChartViewer may send CVN_ViewPortChanged messages when the mouse clicks or drags on the plot area (see CChartViewer.setMouseUsage). CChartViewer also allows external objects (such as scroll bars, navigation buttons, timers, etc) to modify the viewport. This method allows external objects to request CChartViewer to send CVN_ViewPortChanged messages.

Many controls are able to update the viewport continuously as they are used. For example, a scroll bar may update the viewport continuously as the mouse drags on it. For these cases, the chart display may be updated continuously as the viewport changes. However, the image map does not need to update until the scrolling is completed (when the mouse button is released on the scroll bar - on Windows, this is the SB_ENDSCROLL message of the scroll bar ).

The needUpdateChart argument and needUpdateImageMap argument allows one to specify if the event requires a chart update, and/or an image map update.

For charts with a lot of hot spots and tool tips, the CPU power needed to handle the image map may not be negligible. Removing unnecessary image map updates may increase the update rate when the chart is being updated continuously.

Arguments

ArgumentDefaultDescription
needUpdateChart(Mandatory)A boolean value to indicate if the chart needs to be updated.
needUpdateImageMap(Mandatory)A boolean value to indicate if the image map needs to be updated.

Return Value

None