Version

Working with Step Area Chart Data

This topic discusses useful information that will help you to ensure that your data is rendered properly in the step area chart.

Data Requirements

While the Chart control allows you to easily point the chart to your own custom data, it is important that you are supplying the appropriate amount and type of data that the chart requires. If the data does not meet the minimum requirements based on the type of chart that you are using, an error will be generated.

The following is a list of data requirements for step area charts:

Note
Note

If the data available is in a format where each column represents one line, and each row contains points for each line, then you should swap the rows and columns. For information on how to do this, see Swap Rows and Columns.

Mapping Data to Step Area Charts

The chart data is rendered using the following rules:

  • The first DateTime column in the data source will be used for the x-axis (horizontal axis) values.

  • The first numeric column in the data source will be used for the y-axis (vertical axis) values.

  • Each row is plotted as a single data point in the stepped line, using a coordinate generated by mapping the data values on the x-axis and y-axis.

  • The x-axis (or horizontal axis) is a time-scale axis, with points spaced out according to a continuous scale of time. Date/Time values on the x-axis can be formatted using the FormatString properties of the x-axis labels and a DateTime format string:

UltraChart.Axis.X.Labels.ItemFormatString = "<ITEM_LABEL:MMM dd, yyyy>"
  • The y-axis (or vertical axis) is the numeric axis. Labels on the y-axis can be formatted using the FormatString properties and a numeric format string:

UltraChart.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:##.##>"

See below for an example data set, along with the rendered step area chart.

StockDate StockOpen StockClose

1/3/2006

82

82

12/27/2005

83

82

12/19/2005

83

83

12/12/2005

87

83

12/5/2005

88

87

11/28/2005

89

89

11/21/2005

88

89

11/14/2005

84

88

11/7/2005

83

85

10/31/2005

82

83

10/24/2005

83

81

10/17/2005

82

83

10/10/2005

81

82

10/3/2005

80

80

9/26/2005

78

80

9/19/2005

78

80

9/12/2005

81

80

9/6/2005

80

81

8/29/2005

80

79

8/22/2005

83

80

8/15/2005

80

83

8/8/2005

83

82

8/1/2005

83

83

7/25/2005

84

83

7/18/2005

82

84

7/11/2005

79

82

7/5/2005

74

79

Shows a Step Area Chart based on the data listed in the table above.