Author: kono
Date: 2010-06-28 14:10:56 -0700 (Mon, 28 Jun 2010)
New Revision: 20694

Modified:
   
csplugins/trunk/ucsd/mes/GoogleChartFunctions/src/org/cytoscape/equations/internal/googlechart/GoogleBarChartFunction.java
Log:
Bar chart range fixed.

Modified: 
csplugins/trunk/ucsd/mes/GoogleChartFunctions/src/org/cytoscape/equations/internal/googlechart/GoogleBarChartFunction.java
===================================================================
--- 
csplugins/trunk/ucsd/mes/GoogleChartFunctions/src/org/cytoscape/equations/internal/googlechart/GoogleBarChartFunction.java
  2010-06-28 21:08:43 UTC (rev 20693)
+++ 
csplugins/trunk/ucsd/mes/GoogleChartFunctions/src/org/cytoscape/equations/internal/googlechart/GoogleBarChartFunction.java
  2010-06-28 21:10:56 UTC (rev 20694)
@@ -57,7 +57,12 @@
                        final BarChartPlot bar = Plots.newBarChartPlot(
                                        
com.googlecode.charts4j.DataUtil.scaleWithinRange(min, max,
                                                        data), 
colors.get(colorIndex));
-                       bar.setZeroLine(50);
+                       if(min<0 && max<=0)
+                               bar.setZeroLine(100);
+                       else if( min<0 )
+                               bar.setZeroLine(50);
+                       else
+                               bar.setZeroLine(0);
                        bars.add(bar);
                        colorIndex++;
                }
@@ -72,20 +77,7 @@
 
                if (title.trim().length() != 0)
                        ((AbstractGraphChart) chart).setTitle(title);
-               //
-               // if(axis) {
-               // // Setup Axis label
-               // AxisStyle axisStyle = AxisStyle.newAxisStyle(Color.DARKGRAY, 
12,
-               // AxisTextAlignment.CENTER);
-               //
-               // final Double center = (Math.abs(max)-Math.abs(min))/2;
-               // AxisLabels yAxis = 
AxisLabelsFactory.newAxisLabels(min.toString(),
-               // center.toString(), max.toString());
-               // yAxis.setAxisStyle(axisStyle);
-               //
-               // ((AbstractAxisChart) chart).addYAxisLabels(yAxis);
-               // return chart.toURLString() + extraArgs;
-               // } else
+               
                return chart.toURLString() + extraArgs;
        }
 }

-- 
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.

Reply via email to