ChartDirector 7.1 (C++ Edition)

DataAccelerator.setSubsetRange


Usage

void setSubsetRange(double xStart, double xEnd, int resolution = 0);

Description

Set the data range used for chart plotting.

For zoomable and scrollable chart, depending on the zoom level, only part of the data may be visible. The setSubsetRange method should be used to set the visible x range so that the DataAccelerator can supply the chart with the necessary data only.

The resolution argument is a hint of the number of pixels available in the x direction for plotting the data. This argument avoids the DataAccelerator from providing too much data to the chart. For example, if only 600 pixels are available in the x direction, it is not necessary to provide 10 million points to the chart, as they will overlap and block each others and the vast majority would not be visible. The DataAccelerator employs a special algorithm that can reduce the data to match the resolution without noticeably affecting the shape of the plotted chart.

Arguments

ArgumentDefaultDescription
xStart(Mandatory)The x value at the start of the visible range.
xEnd(Mandatory)The x value at the end of the visible range.
resolution0The approximate number of pixels available in the x direction for plotting the chart. In the most common case that the x-axis is horizontal, this is the plot area width. If this argument is not provided, ChartDirector will automatically choose the resolution to use.

Return Value

None