DataWidth property: Chart class

Description

This property returns or sets the number of rows to plot for a series. The starting point for the number of rows is set with the DataStartRow property. If the DataWidth property value is not set, then the width is from the DataStartRow to the last element in the rowset. If the property value is less than zero, then it will automatically be set to one.

This property is read/write.

Example

Suppose your rowset returned 400 rows. You wouldn't want all 400 to display in your chart. Instead, you'd pick a subset of those rows. The row to start with is set with DataStartRow, while how many rows to display is set with DataWidth.

The following code could be used with a push button connected with a chart. The push button enables the next set of data to appear with the chart.

You do not need to refresh after setting this property. When a method or property is used, the chart is automatically refreshed.

Local Chart &MyChart;

&MyChart = GetChart(ChartRec.DisplayField);
&Start = &MyChart.DataStartRow;
/* display the next 20 rows of data */
&MyChart.DataStartRow = &Start + 20;
&MyChart.DataWidth = 20;