ChartDirector 6.0 (Perl Edition)

LineLayer.setFastLineMode


Usage

setFastLineMode([ b ])

Description

Enables or disables fast line mode.

In a chart, the plot area width is usually a few hundred to around 2000 pixels. For a line chart that "flows" horizontally (eg. from left to right), if there are a lot more data points (eg. 100000 data points than the plot area pixel width, many of the points would be at the same x-pixel coordinates. The line segments joining the data points at the same x-pixel coordinates would just be oscillating up and down, overlapping themselves. What is visible at each x-pixel position is essentially a line joining the minimum point and the maximum point.

In fast line mode, ChartDirector will automatically detect that there are too many points in the same x-pixel coordinate, and draws only a line segment joining the extreme points at that coordinate. The resulting line is visually indistinguishable from a line in which the line segments join all data points. The fast line mode can significantly reduce the number of points drawn without affecting the chart appearance.

The fast line mode has no effect if there are not significantly more data points than the pixel width of the plot area. For charts with evenly spaced data points, the fast line mode would only act on x-pixel positions with too many data points. Thus the fast line mode can be enabled on line charts regardless of the number of data points.

The fast line mode should not be used if the data points are not flowing horizontally (or vertically if XYChart.swapXY is in effect), but are flowing in random directions.

Arguments

ArgumentDefaultDescription
btrue (non-zero)A true (non-zero) value enables fast line mode. A false (zero) value disables fast line mode.

Return Value

None