How to Organize Your Data for Charting


[Simple Line Charts]  [Pie Charts]  [Stock Charts]  [More Complex Charts]


To create a simple line chart (one line), your data must have:

For a simple line chart, your data might look like this:

 
Categories Series-1

Jan

15
Feb 27
Mar 32
Apr 43

 


To create a pie chart, only two columns are required; your data must have:

For a pie chart, your data might look like this:

 
Categories Series-1

Jan

15
Feb 27
Mar 32
Apr 43

 


To create a stock chart, five columns are required for one stock plot; your data must have:

For a stock chart, your data might look like this:

Date Low High Open Close

1-May-2002

15 17 15.5 16.5
2-May-2002 16 19 17 18
3-May-2002 21 23 21 22.5
4-May-2002 24 27 25 26
5-May-2002 26 28 26.5 27.5

 


To create a more complex chart (perhaps stacked or side-by-side bars, or lines, or bar-and-line), the categories column will always be represented along the horizontal axis; one series column might be represented by a line,  another by a set of bars, and so forth.

rChart on-line demonstration by rObjects - http://www.robjects.com