List of charts

From Socr

(Difference between revisions)
Jump to: navigation, search
(Pie Chart Examples)
 
(11 intermediate revisions not shown)
Line 35: Line 35:
|}
|}
-
=== Note ===
+
<Strong>Note</strong>
 +
 
Pie chart can be created using the getPieChart method.  
Pie chart can be created using the getPieChart method.  
See [[list of charts#The_getChart_methods|the get*Chart methods section]] for detail.
See [[list of charts#The_getChart_methods|the get*Chart methods section]] for detail.
-
-------
 
='''Bar Chart'''=
='''Bar Chart'''=
-
=== Bar chart Examples ===
+
 
{| border="1"
{| border="1"
|+ Bar Charts  
|+ Bar Charts  
Line 59: Line 59:
}
}
-
  chart = chartMaker.getCategoryChart("Bar", chartTitle, "Category", "value", dataTable, no_category, pairs, "");
+
  chart = chartMaker.getCategoryChart("Bar", chartTitle, "Category", "value",  
 +
                              dataTable, no_category, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
  </pre>
  </pre>
Line 191: Line 192:
  chartPanel = new ChartPanel(chart, false);   
  chartPanel = new ChartPanel(chart, false);   
</pre>
</pre>
 +
|-
 +
|Histogram Chart|| [[image:chart_histogram.jpg|thumb|none|150px]] || [[image:chart_histogram_data.jpg|thumb|none|250px]]  || <pre>
 +
 +
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
 +
 +
int no_series = dataTable.getColumnCount(); //one y column only
 +
int[][] pairs = new int[no_series][2];
 +
for (int i=0; i<no_series; i++){
 +
pairs[i][0] = 0;    // there is no x column
 +
pairs[i][1] = 0;    //column y
 +
}
 +
chart = chartMaker.getXYChart("Histogram","Category Chart", "Value", "Frequency", dataTable, no_series, pairs, String.valueOf(bin_size));
 +
chartPanel = new ChartPanel(chart, false);
 +
 +
</pre>
 +
|}
|}
-
===Note===
+
<Strong>Note</strong>
Bar chart can be created using either getCategoryChart or getXYChart method depend on the data.   
Bar chart can be created using either getCategoryChart or getXYChart method depend on the data.   
See [[list of charts#The_getChart_methods|the get*Chart methods section]] for detail.
See [[list of charts#The_getChart_methods|the get*Chart methods section]] for detail.
-
 
-
 
-
--------------
 
='''Line Chart'''=
='''Line Chart'''=
-
=== Line Chart Examples ===
+
 
{| border="1"
{| border="1"
|+ Line Charts  
|+ Line Charts  
Line 220: Line 234:
  }
  }
-
  chart = chartMaker.getCategoryChart("Line",  "Category Chart", "Release", "Class Count", dataTable, no_category, pairs,"nofill");
+
  chart = chartMaker.getCategoryChart("Line",  "Category Chart",  
 +
                                        "Release", "Class Count",  
 +
                                        dataTable, no_category, pairs,"nofill");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 233: Line 249:
pairs[i][1] = 2*i+1;    //column y
pairs[i][1] = 2*i+1;    //column y
  }
  }
-
  chart = chartMaker.getXYChart("Line",chartTitle, "X", "Y", dataTable, no_series, pairs, "");
+
  chart = chartMaker.getXYChart("Line",chartTitle, "X", "Y",  
 +
                              dataTable, no_series, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 246: Line 263:
pairs[i][1] = 2*i+1;    //column y
pairs[i][1] = 2*i+1;    //column y
}
}
-
  chart = chartMaker.getXYChart("Line", "Line Chart", "X", "Y", dataTable, no_series, pairs,"noline");
+
  chart = chartMaker.getXYChart("Line", "Line Chart", "X", "Y",  
 +
                              dataTable, no_series, pairs,"noline");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
 +
|-
 +
| DotChart  || [[image:chart_dotchart.jpg|thumb|none|150px]] || [[image:chart_dotchart_data.jpg|thumb|none|250px]]  || <pre>
 +
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
 +
 +
int no_series = dataTable.getColumnCount();
 +
int[][] pairs = new int[no_series][2];
 +
for (int i=0; i<no_series; i++){
 +
pairs[i][0] = 0;    //no column x
 +
pairs[i][1] = 0;    //column y
 +
}
 +
chart = chartMaker.getXYChart("Dot","Dot Chart", "Y", "X", dataTable, no_series, pairs,"noline horizontal");
 +
chartPanel = new ChartPanel(chart, false);
 +
</pre>
 +
|-
 +
| IndexChart  || [[image:chart_indexchart.jpg|thumb|none|150px]] || [[image:chart_indexchart_data.jpg|thumb|none|250px]]  || <pre>
 +
 +
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
 +
 +
                int no_series = dataTable.getColumnCount(); //one y column only
 +
int[][] pairs = new int[no_series][2];
 +
for (int i=0; i<no_series; i++){
 +
pairs[i][0] = 0;    // there is no x column
 +
pairs[i][1] = 0;    //column y
 +
}
 +
chart = chartMaker.getXYChart("Index","Index Chart", "Row", "Data", dataTable, no_series, pairs,"noshape");
 +
chartPanel = new ChartPanel(chart, false);
 +
</pre>
 +
|-
|-
| QQData2Data Chart  || [[image:chart_Dd.jpg|thumb|none|150px]] || [[image:chart_Dd_data.jpg|thumb|none|250px]]  || <pre>
| QQData2Data Chart  || [[image:chart_Dd.jpg|thumb|none|150px]] || [[image:chart_Dd_data.jpg|thumb|none|250px]]  || <pre>
Line 259: Line 305:
pairs[i][1] = 2*i+1;    //column y
pairs[i][1] = 2*i+1;    //column y
}
}
-
  chart = chartMaker.getXYChart("LineQQDD", "QQD2D Chart", "Group1", "Group 2", dataTable, no_series, pairs, "");
+
  chart = chartMaker.getXYChart("LineQQDD", "QQD2D Chart", "Group1", "Group 2",  
 +
                              dataTable, no_series, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 272: Line 319:
pairs[i][1] = 0;    //column y
pairs[i][1] = 0;    //column y
  }
  }
-
  chart = chartMaker.getXYChart("LineQQ", "QQNormalPlot Chart", "Data", "NormalDistribution of Data", dataTable, no_series, pairs, "");
+
  chart = chartMaker.getXYChart("LineQQ", "QQNormalPlot Chart", "Data",  
 +
                                    "NormalDistribution of Data",  
 +
                                    dataTable, no_series, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 281: Line 330:
  pairs[0][0] = 0;  //mean  
  pairs[0][0] = 0;  //mean  
  pairs[0][1] = 1;  // stdDev
  pairs[0][1] = 1;  // stdDev
-
  chart = chartMaker.getXYChart("ND", "Normaldistribution Chart", "X", "Y", dataTable, 1, pairs,  "noshape nofill ");
+
 
 +
  chart = chartMaker.getXYChart("ND", "Normaldistribution Chart", "X", "Y",  
 +
                              dataTable, 1, pairs,  "noshape nofill ");
chartPanel = new ChartPanel(chart, false);  
chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 295: Line 346:
pairs[i][1] = 0;    //column 0 stores series name
pairs[i][1] = 0;    //column 0 stores series name
}
}
-
  chart = chartMaker.getCategoryChart("LineStat",  "LineChart", "Type", "value", dataTable, no_category, pairs, "");
+
  chart = chartMaker.getCategoryChart("LineStat",  "LineChart", "Type", "value",  
 +
                              dataTable, no_category, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 309: Line 361:
pairs[i][1] = 0;    //column 0 stores series name
pairs[i][1] = 0;    //column 0 stores series name
}
}
-
  chart = chartMaker.getCategoryChart("LineStatRaw",  "LineChart", "Type", "value", dataTable, no_category, pairs,  "");
+
  chart = chartMaker.getCategoryChart("LineStatRaw",  "LineChart", "Type", "value",  
 +
                              dataTable, no_category, pairs,  "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 322: Line 375:
pairs[i][1] = 2*i+1;    //column y
pairs[i][1] = 2*i+1;    //column y
}
}
-
  chart = chartMaker.getXYChart("Step", "Step Chart", "X", "Y", dataTable, no_series, pairs, "");
+
  chart = chartMaker.getXYChart("Step", "Step Chart", "X", "Y",  
 +
                              dataTable, no_series, pairs, "");
  chartPanel = new ChartPanel(chart, false);
  chartPanel = new ChartPanel(chart, false);
</pre>
</pre>
|}
|}
-
=== Note ===
+
<Strong>Note</strong>
 +
 
Line chart can be created using either getCategoryChart or getXYChart method depend on the data.   
Line chart can be created using either getCategoryChart or getXYChart method depend on the data.   
See [[list of charts#The_getChart_methods|the get*Chart methods section]] for detail.
See [[list of charts#The_getChart_methods|the get*Chart methods section]] for detail.
-
 
-
------------------------
 
= '''Area Chart'''=
= '''Area Chart'''=
-
=== Area Chart Example ===
+
 
{| border="1"
{| border="1"
|+ Area Charts  
|+ Area Charts  
Line 352: Line 405:
}
}
-
  chart = chartMaker.getCategoryChart("Area", "Area Chart", "Category", "value", dataTable, no_category, pairs, "");
+
  chart = chartMaker.getCategoryChart("Area", "Area Chart", "Category", "value",  
 +
                              dataTable, no_category, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
Line 367: Line 421:
}
}
-
  chart = chartMaker.getXYChart("Area", "Area Chart", "X", "Y", dataTable, no_series, pairs,"");
+
  chart = chartMaker.getXYChart("Area", "Area Chart", "X", "Y",  
 +
                              dataTable, no_series, pairs,"");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 382: Line 437:
  String time_type = "Day";
  String time_type = "Day";
-
  chart = chartMaker.getXYChart("AreaTime","Area Chart", "X", "Y", dataTable, no_series, pairs, time_type);
+
  chart = chartMaker.getXYChart("AreaTime","Area Chart", "X", "Y",
 +
                              dataTable, no_series, pairs, time_type);
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 395: Line 451:
       pairs[i][1] = 2*i+1;    //column y
       pairs[i][1] = 2*i+1;    //column y
}
}
-
   chart = chartMaker.getTableXYAreaChart("Area Chart", "X Vaue", "Y Value", dataTable, no_series, pairs, "");
+
   chart = chartMaker.getTableXYAreaChart("Area Chart", "X Vaue", "Y Value",  
 +
                                  dataTable, no_series, pairs, "");
   chartPanel = new ChartPanel(chart, false);  
   chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 401: Line 458:
|}
|}
-
=== Note ===
+
<Strong>Note</strong>
 +
 
Area chart can be created using either getCategoryChart or getXYChart method depend on the data.   
Area chart can be created using either getCategoryChart or getXYChart method depend on the data.   
Line 407: Line 465:
See [[list of charts#The_getChart_methods|the get*Chart methods section]] for detail.
See [[list of charts#The_getChart_methods|the get*Chart methods section]] for detail.
-
 
-
------------
 
= '''Miscellaneous Charts''' =
= '''Miscellaneous Charts''' =
-
=== Misc Chart Examples ===
 
{| border="1"
{| border="1"
|+ Miscellaneous  Charts  
|+ Miscellaneous  Charts  
Line 426: Line 481:
pairs[i][1] = 2*i+1;    //column y
pairs[i][1] = 2*i+1;    //column y
}
}
-
  chart = chartMaker.getXYChart("Line",chartTitle, "X", "Y", dataTable, no_series, pairs,"");
+
  chart = chartMaker.getXYChart("Line",chartTitle, "X", "Y",  
 +
                                      dataTable, no_series, pairs,"");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 439: Line 495:
}
}
-
  chart = chartMaker.getCompassChart("CompassChart",  dataTable, no_series, pairs, "");
+
  chart = chartMaker.getCompassChart("CompassChart",   
 +
                                dataTable, no_series, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 455: Line 512:
}
}
-
  chart = chartMaker.getBoxAndWhiskerCategoryChart(chartTitle, "Category", "value", dataTable, no_category, pairs,"");
+
  chart = chartMaker.getBoxAndWhiskerCategoryChart(chartTitle, "Category", "value",
 +
                              dataTable, no_category, pairs,"");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 471: Line 529:
}
}
-
  chart = chartMaker.getXYZBubbleChart("Bubble Chart", "X", "Y", dataTable, no_series, pairs,"");
+
  chart = chartMaker.getXYZBubbleChart("Bubble Chart", "X", "Y",  
 +
                              dataTable, no_series, pairs,"");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 487: Line 546:
}
}
-
  chart = chartMaker.getCategoryChart("Step", "Category Step Chart", "Category", "value", dataTable, no_category, pairs, "");
+
  chart = chartMaker.getCategoryChart("Step", "Category Step Chart", "Category", "value",  
 +
                                  dataTable, no_category, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
Line 518: Line 578:
  String time_type = "Day";
  String time_type = "Day";
-
  chart = chartMaker.getXYChart("DifferenceTime","Line Chart", "Time", "Value", dataTable, no_series, pairs, time_type);
+
  chart = chartMaker.getXYChart("DifferenceTime","Line Chart", "Time", "Value",
 +
                              dataTable, no_series, pairs, time_type);
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 535: Line 596:
  String time_type = "Day";
  String time_type = "Day";
-
  chart = chartMaker.getCategoryChart("EventFreqTime", "Event Frequency Chart", "Category", "Date", dataTable, no_category, pairs, "Day Horizontal");
+
  chart = chartMaker.getCategoryChart("EventFreqTime", "Event Frequency Chart",  
 +
                                "Category", "Date",  
 +
                                dataTable, no_category, pairs, "Day Horizontal");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
Line 551: Line 614:
}
}
-
  chart = chartMaker.getXYChart("Polar", "Polar Chart", "X", "Y", dataTable, no_series, pairs,"");
+
  chart = chartMaker.getXYChart("Polar", "Polar Chart", "X", "Y",  
 +
                                dataTable, no_series, pairs,"");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 567: Line 631:
  }
  }
-
  chart = chartMaker.getCategoryChart("SpiderWeb", "SpiderWeb Chart", "Category", "value", dataTable, no_category, pairs, "");
+
  chart = chartMaker.getCategoryChart("SpiderWeb", "SpiderWeb Chart", "Category", "value",  
 +
                                  dataTable, no_category, pairs, "");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
Line 573: Line 638:
| Symbolic Chart|| [[image:chart_Symbolic.jpg|thumb|none|150px]] || [[image:chart_Symbolic_data.jpg|thumb|none|250px]]  ||  
| Symbolic Chart|| [[image:chart_Symbolic.jpg|thumb|none|150px]] || [[image:chart_Symbolic_data.jpg|thumb|none|250px]]  ||  
<pre>
<pre>
-
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
 
-
  int no_series = dataTable.getRowCount()-1;
+
  ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
-
  int no_category = dataTable.getColumnCount()-2;
+
  int no_series = (dataTable.getColumnCount()-2)/2;
-
  int[][] pairs = new int[no_category][2];
+
  int[][] pairs = new int[no_series][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("SpiderWeb", "SpiderWeb Chart", "Category", "value", dataTable, no_category, pairs, "");
+
for (int i=0; i<no_series; i++){
-
chartPanel = new ChartPanel(chart, false);  
+
pairs[i][0] = 2*i;    //column x
 +
pairs[i][1] = 2*i+1;    //column y
 +
}
 +
 
 +
  chart = chartMaker.getXYChart("SymbolicAxis","SymbolicAxis Chart", "X", "Y",  
 +
                              dataTable, no_series, pairs,"");
 +
chartPanel = new ChartPanel(chart, false);  
 +
</pre>
</pre>
|-
|-
Line 598: Line 665:
}
}
-
  chart = chartMaker.getYIntervalChart("YInterVal Chart", "X", "Y", dataTable, no_series, pairs,"");
+
  chart = chartMaker.getYIntervalChart("YInterVal Chart", "X", "Y",  
 +
                                dataTable, no_series, pairs,"");
  chartPanel = new ChartPanel(chart, false);  
  chartPanel = new ChartPanel(chart, false);  
</pre>
</pre>
|}
|}
 +
<Strong>Note</strong>
-
=== Note ===
 
See [[list of charts#The_getChart_methods|the getChart methods section]] for detail.
See [[list of charts#The_getChart_methods|the getChart methods section]] for detail.
-
------------
+
--------
 +
--------
=The get*Chart methods=
=The get*Chart methods=
*
*
-
  JFreeChart getPieChart(java.lang.String title, javax.swing.JTable table, int[][] pairs, java.lang.String other)  
+
  JFreeChart getPieChart(String title, JTable dataTable, int[][] pairs, String other)  
:Options for the getPieChart methods parameter ''other''  are:  <strong> 2D/3D/ring, clockwise/counter_clockwise</strong>.    ''2D'' is the default.
:Options for the getPieChart methods parameter ''other''  are:  <strong> 2D/3D/ring, clockwise/counter_clockwise</strong>.    ''2D'' is the default.
Line 617: Line 686:
----------
----------
*
*
-
  JFreeChart getXYChart(java.lang.String chartType, java.lang.String title, java.lang.String xLabel,  java.lang.String yLabel,
+
  JFreeChart getXYChart(String chartType, String title, String xLabel,  String yLabel,  
-
                            javax.swing.JTable table, int numberOfSeries, int[][] pairs, java.lang.String other)  
+
                                      JTable dataTable, int numberOfSeries, int[][] pairs, String other)  
          
          
-
:Options for the getXYChart method's parameter ''chartType'' are: <strong>line/bar/linetime/lineqq/lineqqdd/area/areatime/step/nd/differencetime/symbolicaxis/polar</strong>. ''line'' is the default.
+
:Options for the getXYChart method's parameter ''chartType'' are: <strong>line/bar/linetime/lineqq/lineqqdd/area/areatime/step/nd/differencetime/symbolicaxis/polar/dot/index/histogram</strong>. ''line'' is the default.
:Options for the getXYChart method's parameter ''other'' are:  <strong>horizontal/vertical,  noline/nofill/noshape,  year/month/day/minute</strong>.    ''Vertical''  is the default.
:Options for the getXYChart method's parameter ''other'' are:  <strong>horizontal/vertical,  noline/nofill/noshape,  year/month/day/minute</strong>.    ''Vertical''  is the default.
Line 626: Line 695:
----------
----------
*  
*  
-
   JFreeChart getCategoryChart(java.lang.String chartType, java.lang.String title, java.lang.String xLabel,  java.lang.String yLabel,
+
   JFreeChart getCategoryChart(String chartType, String title, String xLabel,  String yLabel,  
-
                            javax.swing.JTable table, int numberOfCategory, int[][] pairs, java.lang.String other)  
+
                                              JTable dataTable, int numberOfCategory, int[][] pairs, String other)  
-
:Options for the getXYChart method's parameter ''chartType'' are: <strong>bar/barstat/barstatraw/line/linestat/linestatraw/step/area/areatime/eventfreq/spiderweb</strong>. ''bar'' is the default.  
+
:Options for the getCategoryChart method's parameter ''chartType'' are: <strong>bar/barstat/barstatraw/line/linestat/linestatraw/step/area/areatime/eventfreq/spiderweb</strong>. ''bar'' is the default.  
:Options for the getCategoryChart method's parameter ''other'' are:  <strong>horizontal/vertical,  3D,  stacked/layered/waterfall, year/month/day/minute</strong>.    ''Vertical''  is the default.
:Options for the getCategoryChart method's parameter ''other'' are:  <strong>horizontal/vertical,  3D,  stacked/layered/waterfall, year/month/day/minute</strong>.    ''Vertical''  is the default.
Line 635: Line 704:
----------
----------
*
*
-
  JFreeChart getTableXYAreaChart(java.lang.String title, java.lang.String xLabel, java.lang.String yLabel,  
+
  JFreeChart getTableXYAreaChart(String title, String xLabel, String yLabel,
-
                            javax.swing.JTable table, int numberOfSeries, int[][] pairs, java.lang.String other)  
+
                                                        JTable dataTable, int numberOfSeries, int[][] pairs, String other)  
            
            
:The parameter ''other''  in getTableXYAreaChart method is not currently used.
:The parameter ''other''  in getTableXYAreaChart method is not currently used.
Line 642: Line 711:
----------
----------
*
*
-
  JFreeChart getBoxAndWhiskerCategoryChart(java.lang.String title, java.lang.String xLabel, java.lang.String yLabel,
+
  JFreeChart getBoxAndWhiskerCategoryChart(String title, String xLabel, String yLabel,
-
                                  javax.swing.JTable table, int numberOfCategory, int[][] pairs, java.lang.String other)  
+
                                                                JTable dataTable, int numberOfCategory, int[][] pairs, String other)  
:The parameter ''other''  in getBoxAndWhiskerChart method is not currently used.
:The parameter ''other''  in getBoxAndWhiskerChart method is not currently used.
Line 649: Line 718:
----------
----------
*
*
-
  JFreeChart getCompassChart(java.lang.String title, javax.swing.JTable table, int numberOfSeries,  
+
  JFreeChart getCompassChart(String title, JTable dataTable, int numberOfSeries,   int[][] pairs, String other)  
-
                                int[][] pairs, java.lang.String other)  
+
      
      
:The parameter ''other''  in getCompassChart method is not currently used.
:The parameter ''other''  in getCompassChart method is not currently used.
Line 656: Line 724:
----------     
----------     
*
*
-
  JFreeChart getXYZBubbleChart(java.lang.String title, java.lang.String xLabel, java.lang.String yLabel,  
+
  JFreeChart getXYZBubbleChart(String title, String xLabel, String yLabel,  
-
                              javax.swing.JTable table, int numberOfSeries, int[][] pairs, java.lang.String other)  
+
                                                  JTable dataTable, int numberOfSeries, int[][] pairs, String other)  
:The parameter ''other''  in getXYZBubbleChart method is not currently used.
:The parameter ''other''  in getXYZBubbleChart method is not currently used.
Line 663: Line 731:
----------             
----------             
*
*
-
  JFreeChart getYIntervalChart(java.lang.String title, java.lang.String xLabel, java.lang.String yLabel,  
+
  JFreeChart getYIntervalChart(String title, String xLabel, String yLabel,
-
                              javax.swing.JTable table, int numberOfSeries, int[][] pairs, java.lang.String other)  
+
                                                  JTable dataTable, int numberOfSeries, int[][] pairs, String other)  
:The parameter ''other''  in getYIntervalChart method is not currently used.
:The parameter ''other''  in getYIntervalChart method is not currently used.

Current revision as of 17:38, 6 October 2006

Contents

Pie Chart

Pie Charts
Chart Chart data in JTable Sample code
PieChart2D
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
int[][] pairs = new int[1][2];
pairs[0][0] = 1;   // value
pairs[0][1] = 0;   // name

chart = chartMaker.getPieChart(chartTitle, dataTable, pairs,"");
chartPanel = new ChartPanel(chart, false); 
PieChart3D with rotation
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
int[][] pairs = new int[1][2];
pairs[0][0] = 1;   // value
pairs[0][1] = 0;   // name

chart = chartMaker.getPieChart(chartTitle, dataTable, pairs,"3D counter_clockwise");
chartPanel = new ChartPanel(chart, false); 
RingChart
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
int[][] pairs = new int[1][2];
pairs[0][0] = 1;   // value
pairs[0][1] = 0;   // name

chart = chartMaker.getPieChart(chartTitle, dataTable, pairs,"ring");
chartPanel = new ChartPanel(chart, false); 

Note

Pie chart can be created using the getPieChart method.

See the get*Chart methods section for detail.


Bar Chart

Bar Charts
Chart Chart data in JTable Sample code
Bar2D
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
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
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
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
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
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
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
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 using XYDataset with Time Axis
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);  
Histogram Chart

		 ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
		
		 int no_series = dataTable.getColumnCount();	//one y column only 	 
		 int[][] pairs = new int[no_series][2];
		 for (int i=0; i<no_series; i++){
			 pairs[i][0] = 0;    // there is no x column
			 pairs[i][1] = 0;    //column y
		 }
		 chart = chartMaker.getXYChart("Histogram","Category Chart", "Value", "Frequency", dataTable, no_series, pairs, String.valueOf(bin_size));	
		 chartPanel = new ChartPanel(chart, false); 
		 


Note

Bar chart can be created using either getCategoryChart or getXYChart method depend on the data.

See the get*Chart methods section for detail.

Line Chart

Line Charts
Chart Chart data in JTable Sample code
Line chart using CategoryDataset
 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("Line",  "Category Chart", 
                                         "Release", "Class Count", 
                                         dataTable, no_category, pairs,"nofill");
 chartPanel = new ChartPanel(chart, false); 
Line Chart using XYDataset
 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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
 }
 chart = chartMaker.getXYChart("Line",chartTitle, "X", "Y", 
                              dataTable, no_series, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
Scatter Line Chart
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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
	 }
 chart = chartMaker.getXYChart("Line", "Line Chart", "X", "Y", 
                               dataTable, no_series, pairs,"noline");
 chartPanel = new ChartPanel(chart, false); 
DotChart
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
		
		 int no_series = dataTable.getColumnCount();	 
		 int[][] pairs = new int[no_series][2];
		 for (int i=0; i<no_series; i++){
			 pairs[i][0] = 0;    //no column x
			 pairs[i][1] = 0;    //column y
		 }
		 chart = chartMaker.getXYChart("Dot","Dot Chart", "Y", "X", dataTable, no_series, pairs,"noline horizontal");	
		 chartPanel = new ChartPanel(chart, false); 
IndexChart

		 ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
	
                int no_series = dataTable.getColumnCount();	//one y column only 	
		 int[][] pairs = new int[no_series][2];
		 for (int i=0; i<no_series; i++){
			 pairs[i][0] = 0;    // there is no x column
			 pairs[i][1] = 0;    //column y
		 }
		 chart = chartMaker.getXYChart("Index","Index Chart", "Row", "Data", dataTable, no_series, pairs,"noshape");	
		 chartPanel = new ChartPanel(chart, false); 
QQData2Data Chart
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
			
int no_series = dataTable.getColumnCount()/2;		 
 int[][] pairs = new int[no_series][2];
 for (int i=0; i<no_series; i++){
	 pairs[i][0] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
	 }
 chart = chartMaker.getXYChart("LineQQDD", "QQD2D Chart", "Group1", "Group 2", 
                              dataTable, no_series, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
QQNormal Chart
ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
				
 int no_series = dataTable.getColumnCount();	//one y column only  
 int[][] pairs = new int[no_series][2];
 for (int i=0; i<no_series; i++){
	 pairs[i][0] = 0;    // there is no x column
	 pairs[i][1] = 0;    //column y
 }
 chart = chartMaker.getXYChart("LineQQ", "QQNormalPlot Chart", "Data", 
                                    "NormalDistribution of Data", 
                                    dataTable, no_series, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
NormalDistrribution Chart
 ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
 int[][] pairs = new int[1][2];
 pairs[0][0] = 0;   //mean 
 pairs[0][1] = 1;   // stdDev

 chart = chartMaker.getXYChart("ND", "Normaldistribution Chart", "X", "Y", 
                              dataTable, 1, pairs,  "noshape nofill ");
chartPanel = new ChartPanel(chart, false); 
StatisticalLine Chart
 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("LineStat",  "LineChart", "Type", "value", 
                               dataTable, no_category, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
StatisticalLine Chart using raw data
 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("LineStatRaw",  "LineChart", "Type", "value", 
                               dataTable, no_category, pairs,  "");
 chartPanel = new ChartPanel(chart, false); 
Step Chart using XYDataset
 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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
	 }
 chart = chartMaker.getXYChart("Step", "Step Chart", "X", "Y", 
                               dataTable, no_series, pairs, "");
 chartPanel = new ChartPanel(chart, false); 			

Note

Line chart can be created using either getCategoryChart or getXYChart method depend on the data.

See the get*Chart methods section for detail.

Area Chart

Area Charts
Chart Chart data in JTable Sample code
Area Chart using CategoryDataset
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("Area", "Area Chart", "Category", "value", 
                               dataTable, no_category, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
			
Area Chart using XYDataset
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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
	 }

 chart = chartMaker.getXYChart("Area", "Area Chart", "X", "Y", 
                              dataTable, no_series, pairs,"");
 chartPanel = new ChartPanel(chart, false); 
Area Chart with Time Axis
 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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
 }

 String time_type = "Day";
 chart = chartMaker.getXYChart("AreaTime","Area Chart", "X", "Y",
                               dataTable, no_series, pairs, time_type);
 chartPanel = new ChartPanel(chart, false); 
Stacked Area Chart
  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] = 2*i;    //column x
      pairs[i][1] = 2*i+1;    //column y
	 }
   chart = chartMaker.getTableXYAreaChart("Area Chart", "X Vaue", "Y Value", 
                                  dataTable, no_series, pairs, "");
   chartPanel = new ChartPanel(chart, false); 

Note

Area chart can be created using either getCategoryChart or getXYChart method depend on the data.

Stacked area chart can be created using getTableXYChart method.

See the get*Chart methods section for detail.

Miscellaneous Charts

Miscellaneous Charts
Chart Chart data in JTable Sample code
Crosshair Chart
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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
	 }
 chart = chartMaker.getXYChart("Line",chartTitle, "X", "Y", 
                                       dataTable, no_series, pairs,"");
 chartPanel = new ChartPanel(chart, false); 
Crosshair Chart time
 ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();

 int no_series = dataTable.getColumnCount();		 
 int[][] pairs = new int[no_series][1];
 for (int i=0; i<no_series; i++){
	 pairs[i][0] = i;    //column x
	 }
	
 chart = chartMaker.getCompassChart("CompassChart",  
                                dataTable, no_series, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
BoxAndWhisker Chart
 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.getBoxAndWhiskerCategoryChart(chartTitle, "Category", "value",
                               dataTable, no_category, pairs,"");
 chartPanel = new ChartPanel(chart, false); 
Bubble Chart
 ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();

 int no_series = (dataTable.getColumnCount())/3;		 
 int[][] pairs = new int[no_series][3];
 for (int i=0; i<no_series; i++){
	 pairs[i][0] = 3*i;    //column x
	 pairs[i][1] = 3*i+1;    //column y
	 pairs[i][2] = 3*i+2;    //column y
	 }
	
 chart = chartMaker.getXYZBubbleChart("Bubble Chart", "X", "Y", 
                               dataTable, no_series, pairs,"");
 chartPanel = new ChartPanel(chart, false); 
Category Step Chart
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("Step", "Category Step Chart", "Category", "value", 
                                  dataTable, no_category, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
			
Compass Chart
 ChartGenerator_JTable chartMaker = new ChartGenerator_JTable();
		 
 int no_series = dataTable.getColumnCount();		 
 int[][] pairs = new int[no_series][1];
 for (int i=0; i<no_series; i++){
	 pairs[i][0] = i;    //column x
 }
	
 chart = chartMaker.getCompassChart("CompassChart",  dataTable, no_series, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
Difference Chart
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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
 }

 String time_type = "Day";
 chart = chartMaker.getXYChart("DifferenceTime","Line Chart", "Time", "Value",
                               dataTable, no_series, pairs, time_type);
 chartPanel = new ChartPanel(chart, false); 
Event Frequence Chart
 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
	 }

 String time_type = "Day";
 chart = chartMaker.getCategoryChart("EventFreqTime", "Event Frequency Chart", 
                                "Category", "Date", 
                                dataTable, no_category, pairs, "Day Horizontal");	
 chartPanel = new ChartPanel(chart, false); 
			
Polar Chart
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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
	 }

 chart = chartMaker.getXYChart("Polar", "Polar Chart", "X", "Y", 
                                dataTable, no_series, pairs,"");
 chartPanel = new ChartPanel(chart, false); 
Spiderweb Chart
 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("SpiderWeb", "SpiderWeb Chart", "Category", "value", 
                                   dataTable, no_category, pairs, "");
 chartPanel = new ChartPanel(chart, false); 
Symbolic Chart

 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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
	 }

 chart = chartMaker.getXYChart("SymbolicAxis","SymbolicAxis Chart", "X", "Y", 
                              dataTable, no_series, pairs,"");
chartPanel = new ChartPanel(chart, false); 
			
YInterval Chart
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] = 2*i;    //column x
	 pairs[i][1] = 2*i+1;    //column y
	 }

 chart = chartMaker.getYIntervalChart("YInterVal Chart", "X", "Y", 
                                dataTable, no_series, pairs,"");
 chartPanel = new ChartPanel(chart, false); 

Note

See the getChart methods section for detail.



The get*Chart methods

JFreeChart 	getPieChart(String title, JTable dataTable, int[][] pairs, String other) 
Options for the getPieChart methods parameter other are: 2D/3D/ring, clockwise/counter_clockwise. 2D is the default.

JFreeChart	getXYChart(String chartType, String title, String xLabel,  String yLabel, 
                                     JTable dataTable, int numberOfSeries, int[][] pairs, String other) 
       
Options for the getXYChart method's parameter chartType are: line/bar/linetime/lineqq/lineqqdd/area/areatime/step/nd/differencetime/symbolicaxis/polar/dot/index/histogram. line is the default.
Options for the getXYChart method's parameter other are: horizontal/vertical, noline/nofill/noshape, year/month/day/minute. Vertical is the default.

 JFreeChart	getCategoryChart(String chartType, String title, String xLabel,  String yLabel, 
                                             JTable dataTable, int numberOfCategory, int[][] pairs, String other) 
Options for the getCategoryChart method's parameter chartType are: bar/barstat/barstatraw/line/linestat/linestatraw/step/area/areatime/eventfreq/spiderweb. bar is the default.
Options for the getCategoryChart method's parameter other are: horizontal/vertical, 3D, stacked/layered/waterfall, year/month/day/minute. Vertical is the default.

JFreeChart	getTableXYAreaChart(String title, String xLabel, String yLabel,  
                                                       JTable dataTable, int numberOfSeries, int[][] pairs, String other) 
          
The parameter other in getTableXYAreaChart method is not currently used.

JFreeChart	getBoxAndWhiskerCategoryChart(String title, String xLabel, String yLabel,
                                                               JTable dataTable, int numberOfCategory, int[][] pairs, String other) 
The parameter other in getBoxAndWhiskerChart method is not currently used.

JFreeChart	getCompassChart(String title, JTable dataTable, int numberOfSeries,   int[][] pairs, String other) 
    
The parameter other in getCompassChart method is not currently used.

JFreeChart	getXYZBubbleChart(String title, String xLabel, String yLabel,   
                                                  JTable dataTable, int numberOfSeries, int[][] pairs, String other) 
The parameter other in getXYZBubbleChart method is not currently used.

JFreeChart	getYIntervalChart(String title, String xLabel, String yLabel,  
                                                 JTable dataTable, int numberOfSeries, int[][] pairs, String other) 
The parameter other in getYIntervalChart method is not currently used.
Personal tools