|
Chart |
Chart data in JTable |
Sample code
|
Bar2D |
Error creating thumbnail: File missing |
|
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);
|
Bar2D Horizontal Layout |
Error creating thumbnail: File missing |
|
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, "horizontal")
chartPanel = new ChartPanel(chart, false);
|
Bar3D |
Error creating thumbnail: File missing |
|
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, "3D")
chartPanel = new ChartPanel(chart, false);
|
Layered Bar |
Error creating thumbnail: File missing |
|
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, "layered");
chartPanel = new ChartPanel(chart, false);
|
Stacked Bar |
Error creating thumbnail: File missing |
|
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, "stacked");
chartPanel = new ChartPanel(chart, false);
|
Waterfall Bar |
Error creating thumbnail: File missing |
|
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", "Product Cost Breakdown",
"Expense Category",
"Cost Per Unit", dataTable, no_category, pairs, "waterfall");
chartPanel = new ChartPanel(chart, false);
|
Statistical Bar |
Error creating thumbnail: File missing |
|
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("BarStat", chartTitle, "Type", "value", dataTable, no_category, pairs, "");
chartPanel = new ChartPanel(chart, false);
|
Statistical Bar with Raw Data |
Error creating thumbnail: File missing |
|
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("BarStatRaw", chartTitle, "Type", "value", dataTable, no_category, pairs, "");
chartPanel = new ChartPanel(chart, false);
|
XY BarChart* |
Error creating thumbnail: File missing |
|
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
int no_series = (dataTable.getColumnCount()-2)/2;
int[][] pairs = new int[no_series][2];
for (int i=0; i<no_series; i++){
pairs[i][0] = i*2; //column 1 stores value
pairs[i][1] = i*2+1; //column 0 stores time
}
chart = chartMaker.getXYChart("Bar",chartTitle, "Category", "value", dataTable, no_series, pairs,"Year");
chartPanel = new ChartPanel(chart, false);
|