Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4889 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels

Subject: perfsonar development work

List archive

perfsonar: r4889 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4889 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels
  • Date: Sat, 17 Jan 2009 09:08:33 -0500

Author: nina
Date: 2009-01-17 09:08:32 -0500 (Sat, 17 Jan 2009)
New Revision: 4889

Modified:

branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
Log:
Minimum tick for IPDV/OWD/errors/discards graphs changed to be an integer
always

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
2009-01-17 11:26:25 UTC (rev 4888)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
2009-01-17 14:08:32 UTC (rev 4889)
@@ -36,6 +36,8 @@
import org.jfree.chart.axis.DateAxis;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.axis.NumberTickUnit;
+import org.jfree.chart.axis.TickUnit;
+import org.jfree.chart.axis.TickUnitSource;
import org.jfree.chart.plot.CombinedDomainXYPlot;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.xy.XYItemRenderer;
@@ -121,6 +123,23 @@
}

protected void preparePlots() {
+ TickUnitSource units = new TickUnitSource() {
+ public TickUnit getCeilingTickUnit(double arg0) {
+ double d = Math.rint(arg0);
+ if (d < arg0) d += 1.0;
+ return new NumberTickUnit(d);
+ }
+ public TickUnit getCeilingTickUnit(TickUnit arg0) {
+ return getCeilingTickUnit(arg0.getSize());
+ }
+ public TickUnit getLargerTickUnit(TickUnit arg0) {
+ return getCeilingTickUnit(arg0);
+ }
+ };
+ /*
+ for (int i=0; i <10; i++) units.add(new NumberTickUnit(i));

+ for (int i=10; i <=150; i+=10) units.add(new
NumberTickUnit(i));
+ */
dateAxis = new DateAxis("", TimeZone.getDefault(),
Locale.getDefault());
dateAxis.setAutoRange(true);
dateAxis.setDateFormatOverride(new SimpleDateFormat("d MMM yy
HH:mm:ss"));
@@ -136,8 +155,9 @@
bitAxis.setAxisLinePaint(gridColor);
bitAxis.setTickMarkPaint(gridColor);
bitAxis.setTickMarksVisible(true);
- bitAxis.setAutoRangeIncludesZero(false);
-
+ bitAxis.setAutoRangeIncludesZero(true);
+ bitAxis.setStandardTickUnits(units);
+
plots[m] = new XYPlot(null,dateAxis,bitAxis,new
XYLineAndShapeRenderer(true,false));

lookup.put(IPPMRequest.measurements[m][i],new Integer(m));
@@ -167,6 +187,7 @@
bitAxis.setTickUnit(new NumberTickUnit(1));
bitAxis.setTickMarksVisible(true);
bitAxis.setAutoRangeIncludesZero(false);
+
plots[IPPMRequest.measurements.length] = new
XYPlot(null,dateAxis,bitAxis,new XYStepAreaRenderer());

for(int i = 1; i<=50; i++){



  • perfsonar: r4889 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels, svnlog, 01/17/2009

Archive powered by MHonArc 2.6.16.

Top of Page