Version

Working with 2D Stacked Bar Chart Data

This topic discusses useful information that will help you to ensure that your data is rendered properly in the 2D stacked bar 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 2D stacked bar charts:

  • The data set contains one or more numeric columns.

  • The columns can contain values that are positive and negative. All columns of the same row are "stacked" into a horizontal bar.

  • If you are binding the 2D stacked bar chart to a series object, see Requirements for Series Binding for information on the series binding requirements.

  • If you are using the 2D stacked bar chart in a composite chart, see Axis Requirements for Composite Charts for information on the axis requirements for the chart.

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 2D Stacked Bar Charts

The chart data is rendered using the following rules:

  • Each row represents a single bar or "stack", which is divided into sections.

  • If there are multiple rows, each row constitutes a different stacked bar.

  • Each column value in each row represents a section of a stacked bar.

See below for an example data set, along with the rendered 2D stacked bar chart.

Week# ActiveX Java NET

Week 1

25

85

65

Week 2

15

200

95

Week 3

100

45

110

Week 4

120

75

99

Week 5

60

113

50

Shows a 2D Stacked bar Chart based on the postive data listed in the table above.

The following example shows data that contains positive and negative values and the rendered 2D stacked chart.

Week# ActiveX Java NET

Day 1

-25

85

-65

Day 2

15

-150

95

Day 3

-100

-45

-110

Day 4

120

75

99

Day 5

-60

113

-50

Shows a 2D Stacked Bar Chart based on the postive and negative data listed in the table above.