List of charts
From Socr
(Difference between revisions)
Line 1: | Line 1: | ||
+ | *Pie Chart | ||
{| border="1" | {| border="1" | ||
|+ Pie Charts | |+ Pie Charts | ||
Line 33: | Line 34: | ||
|} | |} | ||
- | All options for the | + | All options for the getPieChart method: <strong> 2D/3D/ring, clockwise/counter_clockwise</strong>. 2D is default. |
+ | |||
+ | *Bar Chart | ||
+ | {| border="1" | ||
+ | |+ Bar Charts | ||
+ | ! !! Chart !! Chart data in JTable !! Sample code | ||
+ | |- | ||
+ | | Bar2D || [[image:chart_Bar2d.jpg|thumb|none|150px]] || [[image:chart_Bar2d_data.jpg]] || <pre> | ||
+ | ChartGenerator_JTable chartMaker = new ChartGenerator_JTable(); | ||
+ | |||
+ | int no_series = dataTable.getRowCount()-1; | ||
+ | int no_category = dataTable.getColumnCount()-2; | ||
+ | int[][] pairs = new int[no_category][2]; | ||
+ | for (int i=0; i<no_category; i++){ | ||
+ | pairs[i][0] = i+1; //column i store category i | ||
+ | pairs[i][1] = 0; //column 0 stores series name | ||
+ | } | ||
+ | |||
+ | chart = chartMaker.getCategoryChart("Bar", chartTitle, "Category", "value", dataTable, no_category, pairs, "") | ||
+ | chartPanel = new ChartPanel(chart, false); | ||
+ | </pre> | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | All options for the getBarChart method: <strong>horizontial/vertical, stacked/layered/waterfall, year/month/day/minute</strong>. Vertical is default. |
Revision as of 23:35, 19 June 2006
- Pie Chart
All options for the getPieChart method: 2D/3D/ring, clockwise/counter_clockwise. 2D is default.
- Bar Chart
All options for the getBarChart method: horizontial/vertical, stacked/layered/waterfall, year/month/day/minute. Vertical is default.