Author: neildhruva
Date: 2012-06-20 01:24:23 -0700 (Wed, 20 Jun 2012)
New Revision: 29636
Added:
csplugins/trunk/soc/neildhruva/PrintTable/src/main/java/org/cytoscape/sample/internal/CytoChart.java
Log:
Added a sample graph in CytoChart.java to be displayed in the Table View panel
Added:
csplugins/trunk/soc/neildhruva/PrintTable/src/main/java/org/cytoscape/sample/internal/CytoChart.java
===================================================================
---
csplugins/trunk/soc/neildhruva/PrintTable/src/main/java/org/cytoscape/sample/internal/CytoChart.java
(rev 0)
+++
csplugins/trunk/soc/neildhruva/PrintTable/src/main/java/org/cytoscape/sample/internal/CytoChart.java
2012-06-20 08:24:23 UTC (rev 29636)
@@ -0,0 +1,33 @@
+package org.cytoscape.sample.internal;
+
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.PlotOrientation;
+import org.jfree.data.category.DefaultCategoryDataset;
+
+public class CytoChart {
+
+ private JFreeChart chart;
+ private ChartPanel myChart;
+ private DefaultCategoryDataset dataset;
+
+ public CytoChart() {
+
+ dataset = new DefaultCategoryDataset();
+ }
+
+ public ChartPanel createChart(){
+ dataset.setValue(6, "Profit", "Jane");
+ dataset.setValue(7, "Profit", "Tom");
+ dataset.setValue(8, "Profit", "Jill");
+ dataset.setValue(5, "Profit", "John");
+ dataset.setValue(12, "Profit", "Fred");
+ chart = ChartFactory.createBarChart("Comparison between
Salesman",
+ "Salesman", "Profit", dataset, PlotOrientation.VERTICAL,
+ false, true, false);
+ myChart = new ChartPanel(chart);
+ myChart.setMouseWheelEnabled(true);
+ return myChart;
+ }
+}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.