ChartDirector 7.0 (Java Edition)

ChartViewer.setUpdateInterval


Usage

public void setUpdateInterval(int interval)

Description

Sets the minimum gap interval between two ViewPortChanged events in milliseconds.

Some GUI designs may be capable of generate a lot of ViewPortListener.viewPortChanged events rapidly. For example, an external scroll bar may update the viewport and call ChartViewer.updateViewPort rapidly and repeatedly when it is scrolling. As the chart is usually updated in the main GUI thread, updating too rapidly without a gap interval in between may cause other GUI elements to become sluggish.

This method specifies the minimum gap interval between two ViewPortChanged events. The default is 20ms.

If a ViewPortChanged event needs to be fired during the gap interval, the event will be delayed and fired after the gap interval.

If multiple ViewPortChanged events needs to be fired during the gap interval, they will be merged into one event, and be fired after the gap interval.

Arguments

ArgumentDefaultDescription
interval(Mandatory)The minimum gap interval between two ViewPortChanged events in milliseconds.

Return Value

None