Difference between revisions of "Data Visualization with Java"

From Self-Organization Wiki
Jump to: navigation, search
(New page: == ExampleChart Library == * License Model: open source (LGPL license) * Webpage and download: [http://www.ExampleChart.eu] The library bla bla bla ..... ===Code Examples=== The follwi...)
 
Line 1: Line 1:
 +
== JChart2D Library ==
 +
 +
* License Model: open source (LGPL license)
 +
* Webpage and download: [http://jchart2d.sourceforge.net/index.shtml]
 +
 +
The library is very easy to handle and you don't have to spend a lot of time on making adjustments. You can create for example static line charts and dynamic line charts but you cannot create Pie Charts or Bar Charts.
 +
 +
===Code Examples===
 +
 +
The follwing code snipped creates a static XY Diagramm
 +
 +
  import info.monitorenter.gui.chart.Chart2D;
 +
  import info.monitorenter.gui.chart.ITrace2D;
 +
  import info.monitorenter.gui.chart.traces.Trace2DSimple;
 +
  import javax.swing.JFrame;
 +
  public class MinimalStaticChart {
 +
    private MinimalStaticChart() {
 +
      super();
 +
    }
 +
    public static void main(String[]args){
 +
    Chart2D chart = new Chart2D();        // Create a chart:
 +
    ITrace2D trace = new Trace2DSimple(); // Create an ITrace:
 +
    chart.addTrace(trace);                // Add the trace to the chart:
 +
    // Create the Points and add them to the trace
 +
    for(int i=10000;i>=0;i--){
 +
      trace.addPoint(Math.cos(3*(double)i/1000.0),Math.sin(4*(double)i/1000.0));
 +
    }
 +
    // Show the chart on the screen
 +
    JFrame frame = new JFrame("MinimalStaticChart");
 +
    frame.getContentPane().add(chart);
 +
    frame.setSize(400,300);
 +
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 +
    frame.setVisible(true);
 +
    }
 +
  }
 +
 +
which looks like this:
 +
 +
'''Screenshot'''
 +
 
== ExampleChart Library ==
 
== ExampleChart Library ==
  

Revision as of 10:12, 2 July 2010

JChart2D Library

  • License Model: open source (LGPL license)
  • Webpage and download: [1]

The library is very easy to handle and you don't have to spend a lot of time on making adjustments. You can create for example static line charts and dynamic line charts but you cannot create Pie Charts or Bar Charts.

Code Examples

The follwing code snipped creates a static XY Diagramm

 import info.monitorenter.gui.chart.Chart2D;
 import info.monitorenter.gui.chart.ITrace2D;
 import info.monitorenter.gui.chart.traces.Trace2DSimple;
 import javax.swing.JFrame;
 public class MinimalStaticChart {
   private MinimalStaticChart() {
     super();
   }	
   public static void main(String[]args){
   Chart2D chart = new Chart2D();        // Create a chart:
   ITrace2D trace = new Trace2DSimple(); // Create an ITrace: 
   chart.addTrace(trace);                // Add the trace to the chart:
   // Create the Points and add them to the trace
   for(int i=10000;i>=0;i--){
     trace.addPoint(Math.cos(3*(double)i/1000.0),Math.sin(4*(double)i/1000.0));
   } 
   // Show the chart on the screen
   JFrame frame = new JFrame("MinimalStaticChart");
   frame.getContentPane().add(chart);
   frame.setSize(400,300);
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   frame.setVisible(true);
   }
 }

which looks like this:

Screenshot

ExampleChart Library

  • License Model: open source (LGPL license)
  • Webpage and download: [2]

The library bla bla bla .....

Code Examples

The follwing code snipped creates a pie chart together with a life update Venn Diagramm

code

code code
code code? // comment
code code code !!

which looks like this:

Screenshot

Other Libraries

The following Java libraries looked promising, but turned out to be not recommendable:

  • M$$-Chart commercial license (500 € per license)
  • Crash-Chart beta version, still needs a lot of development, crashes frequently
  • Bad-Chart bad performance, missing important chart types like xy-Diagrams