Changeset 2137
- Timestamp:
- Mar 31, 2006, 1:49:41 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/net/sf/basedb/clients/web/DynamicUtil.java
r2102 r2137 70 70 columns.add(new TableColumn(idPrefix + "column", propertyPrefix+"column", Type.INT, titlePrefix+"Column")); 71 71 columns.add(new TableColumn(idPrefix + "x", propertyPrefix+"x", Type.INT, titlePrefix+"X")); 72 columns.add(new TableColumn(idPrefix + " x", propertyPrefix+"x", Type.INT, titlePrefix+"Y"));72 columns.add(new TableColumn(idPrefix + "y", propertyPrefix+"y", Type.INT, titlePrefix+"Y")); 73 73 74 74 List<RawDataProperty> rdpList = rawDataType.getProperties(); -
trunk/src/clients/web/net/sf/basedb/clients/web/servlet/PlotServlet.java
r2131 r2137 51 51 import net.sf.basedb.util.jep.RawFunction; 52 52 import net.sf.basedb.util.plot.HistogramPlot; 53 import net.sf.basedb.util.plot.PlotAnnotation; 53 54 import net.sf.basedb.util.plot.ScatterPlot; 54 55 … … 69 70 import java.io.IOException; 70 71 import java.sql.SQLException; 72 import java.util.Collection; 73 import java.util.Collections; 74 import java.util.HashSet; 71 75 import java.util.List; 72 76 … … 139 143 String yLabel = Values.getStringOrNull(request.getParameter("yLabel")); 140 144 if (yLog && yLabel != null) yLabel = "log2("+yLabel+")"; 145 final String annotation = Values.getStringOrNull(request.getParameter("annotation")); 146 final boolean hasAnnotation = annotation != null; 141 147 142 148 // Scatter plot specified parameters … … 146 152 final String yAggregate = Values.getString(request.getParameter("yAggregate"), "count"); 147 153 final boolean isCount = "count".equals(yAggregate); 154 if (!isCount && yLabel != null) yLabel = yLabel + " (" + yAggregate + ")"; 155 final String hiloAggregate = isCount ? null : 156 Values.getStringOrNull(request.getParameter("hiloAggregate")); 157 148 158 149 159 RenderedImage image = null; … … 171 181 Expression[] x = xFormulas == null ? null : new Expression[xFormulas.length]; 172 182 Expression[] y = yFormulas == null ? null : new Expression[yFormulas.length]; 183 184 // If we should join the raw data table or not 185 boolean joinRaw = false; 173 186 if (xFormulas != null) 174 187 { 175 188 for (int i = 0; i < xFormulas.length; ++i) 176 189 { 190 joinRaw |= xFormulas[i].contains("raw("); 177 191 x[i] = Jep.formulaToExpression(xFormulas[i], ch, raw); 178 192 if (xLog) x[i] = Expressions.log2(x[i]); … … 183 197 for (int i = 0; i < yFormulas.length; ++i) 184 198 { 199 joinRaw |= yFormulas[i].contains("raw("); 185 200 y[i] = Jep.formulaToExpression(yFormulas[i], ch, raw); 186 201 if (yLog) y[i] = Expressions.log2(y[i]); … … 188 203 } 189 204 205 // Get annotations 206 Collection<PlotAnnotation> annotations = null; 207 if (hasAnnotation) 208 { 209 annotations = new HashSet<PlotAnnotation>(); 210 // TODO - implement other annotations than bioassay 211 for (BioAssay baa : bas.getBioAssays().list(dc)) 212 { 213 annotations.add(new PlotAnnotation(baa.getName(), 214 Collections.singleton(new Integer(baa.getDataCubeColumnNo())))); 215 } 216 } 217 190 218 // Get the query 191 219 DynamicSpotQuery query = ba != null ? ba.getSpotData() : bas.getSpotData(); … … 197 225 { 198 226 query.reset(); 199 query.joinRawData(JoinType.INNER); // TODO - only join if used in query 227 if (joinRaw) query.joinRawData(JoinType.INNER); 228 if (hasAnnotation) 229 { 230 query.select(Dynamic.select(VirtualColumn.COLUMN)); 231 } 200 232 query.select(Selects.expression(x[i], "x")); 201 233 query.select(Selects.expression(y[i], "y")); 202 plot.addData(query.iterate(dc), Integer.toString(i)); 234 if (hasAnnotation) 235 { 236 plot.addData(query.iterate(dc), annotations); 237 } 238 else 239 { 240 plot.addData(query.iterate(dc), Integer.toString(i)); 241 } 203 242 } 204 243 chart = plot.getChart(); … … 211 250 { 212 251 query.reset(); 213 query.joinRawData(JoinType.INNER); // TODO - only join if used in query 252 if (joinRaw) query.joinRawData(JoinType.INNER); 253 if (hasAnnotation) 254 { 255 query.select(Dynamic.select(VirtualColumn.COLUMN)); 256 } 214 257 query.select(Selects.expression(x[i], "x")); 215 258 if (!isCount) query.select(Selects.expression(y[i], "y")); 216 plot.addData(query.iterate(dc), Integer.toString(i), binSize, 217 HistogramPlot.YAggregate.valueOf(yAggregate.toUpperCase())); 259 HistogramPlot.YAggregate ya = HistogramPlot.YAggregate.valueOf(yAggregate.toUpperCase()); 260 HistogramPlot.YAggregate hilo = hiloAggregate == null ? null : 261 HistogramPlot.YAggregate.valueOf(hiloAggregate.toUpperCase()); 262 if (hasAnnotation) 263 { 264 plot.addData(query.iterate(dc), annotations, binSize, ya, hilo); 265 } 266 else 267 { 268 plot.addData(query.iterate(dc), Integer.toString(i), binSize, ya, hilo); 269 } 218 270 } 219 271 chart = plot.getChart(); … … 222 274 223 275 if (title != null) chart.setTitle(title); 224 chart.removeLegend();276 if (!hasAnnotation) chart.removeLegend(); 225 277 image = chart.createBufferedImage(width, height); 226 278 … … 260 312 graphics.clearRect(0, 0, width, height); 261 313 graphics.setColor(Color.RED); 262 graphics.drawString(t.getMessage(), 50, 50); 314 String message = t.getMessage(); 315 graphics.drawString(message == null ? "null" : message, 50, 50); 263 316 image = img; 264 317 // TODO - write more of stack trace -
trunk/src/core/net/sf/basedb/util/plot/HistogramPlot.java
r2131 r2137 25 25 package net.sf.basedb.util.plot; 26 26 27 import net.sf.basedb.core.BaseException; 27 28 import net.sf.basedb.core.query.SqlResult; 28 29 import net.sf.basedb.core.query.SqlResultIterator; … … 30 31 import org.jfree.chart.JFreeChart; 31 32 import org.jfree.chart.axis.NumberAxis; 33 import org.jfree.chart.plot.DatasetRenderingOrder; 34 import org.jfree.chart.plot.SeriesRenderingOrder; 32 35 import org.jfree.chart.plot.XYPlot; 33 36 import org.jfree.chart.renderer.xy.XYBarRenderer; 37 import org.jfree.chart.renderer.xy.XYStepRenderer; 38 import org.jfree.chart.renderer.xy.YIntervalRenderer; 34 39 import org.jfree.data.DomainOrder; 35 40 import org.jfree.data.Range; … … 37 42 import org.jfree.data.xy.IntervalXYDataset; 38 43 44 import java.awt.geom.Rectangle2D; 39 45 import java.sql.SQLException; 40 46 import java.util.ArrayList; 47 import java.util.Collection; 48 import java.util.HashMap; 41 49 import java.util.List; 50 import java.util.Map; 42 51 43 52 /** … … 53 62 private XYPlot plot; 54 63 private HistogramDataset histogram; 64 private HistogramDataset hilo; 55 65 private JFreeChart chart; 56 66 … … 59 69 60 70 histogram = new HistogramDataset(); 71 hilo = new HistogramDataset(); 61 72 NumberAxis domainAxis = new NumberAxis(nameX); 62 73 domainAxis.setAutoRangeIncludesZero(false); 74 domainRange = new Range(0.0, 0.0); 75 rangeRange = new Range(0.0, 0.0); 63 76 64 77 NumberAxis rangeAxis = new NumberAxis(nameY); … … 66 79 67 80 plot = new XYPlot(histogram, domainAxis, rangeAxis, new XYBarRenderer()); 68 chart = new JFreeChart(plot); 81 plot.setDataset(1, hilo); 82 YIntervalRenderer yRenderer = new YIntervalRenderer(); 83 yRenderer.setShape(new Rectangle2D.Float(-3, -1, 7, 2)); 84 yRenderer.setSeriesVisibleInLegend(false, false); 85 plot.setRenderer(1, yRenderer, false); 86 87 plot.setSeriesRenderingOrder(SeriesRenderingOrder.FORWARD); 88 plot.setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD); 89 chart = new JFreeChart(plot); 69 90 chart.setAntiAlias(false); 70 91 } 71 92 72 public void addData(SqlResultIterator data, String name, float binSize, YAggregate yAggregate )93 public void addData(SqlResultIterator data, String name, float binSize, YAggregate yAggregate, YAggregate hiloAggregate) 73 94 throws SQLException 74 95 { … … 84 105 xValues[i++] = r.getFloat(1); 85 106 } 86 histogram.addSeries(new HistogramSeries(name, xValues, yValues, binSize, yAggregate)); 107 HistogramSeries main = new HistogramSeries(name, xValues, yValues, binSize, yAggregate, Float.NaN, Float.NaN); 108 histogram.addSeries(main); 109 if (hiloAggregate != null) 110 { 111 hilo.addSeries(new HistogramSeries(name, main, hiloAggregate)); 112 } 113 adjustRanges(); 114 } 115 116 private void adjustRanges() 117 { 87 118 domainRange = Range.combine(domainRange, plot.getRenderer().findDomainBounds(histogram)); 88 rangeRange = Range.combine(rangeRange, plot.getRenderer().findRangeBounds(histogram)); 119 if (hilo.getSeriesCount() > 0) 120 { 121 rangeRange = Range.combine(rangeRange, plot.getRenderer(1).findRangeBounds(hilo)); 122 } 123 else 124 { 125 rangeRange = Range.combine(rangeRange, plot.getRenderer(0).findRangeBounds(histogram)); 126 } 127 rangeRange = Range.expand(rangeRange, 0, 0.02); 89 128 plot.getDomainAxis().setRange(domainRange); 90 plot.getRangeAxis().setRange(0, rangeRange.getUpperBound()); 129 plot.getRangeAxis().setRange(rangeRange); 130 } 131 132 public void addData(SqlResultIterator data, Collection<PlotAnnotation> annotations, float binSize, YAggregate yAggregate, YAggregate hiloAggregate) 133 throws SQLException 134 { 135 final boolean isCount = yAggregate == YAggregate.COUNT; 136 Map<Integer, TempSeries> series = new HashMap<Integer, TempSeries>(annotations.size()); 137 List<TempSeries> tempSeries = new ArrayList<TempSeries>(annotations.size()); 138 int meanCount = data.getTotalCount() / annotations.size(); 139 for (PlotAnnotation pa : annotations) 140 { 141 TempSeries ts = new TempSeries(pa.getName(), meanCount, !isCount); 142 tempSeries.add(ts); 143 for (Integer column : pa.getColumns()) 144 { 145 if (series.containsKey(column)) 146 { 147 throw new BaseException("Column " + column + " has already been mapped to another series"); 148 } 149 series.put(column, ts); 150 } 151 } 152 float maxX = Float.MIN_VALUE; 153 float minX = Float.MAX_VALUE; 154 while (data.hasNext()) 155 { 156 SqlResult r = data.next(); 157 TempSeries ts = series.get(r.getInt(1)); 158 float x = r.getFloat(2); 159 if (maxX < x) maxX = x; 160 if (minX > x) minX = x; 161 ts.x.add(r.getFloat(2)); 162 if (!isCount) ts.y.add(r.getFloat(3)); 163 } 164 165 for (TempSeries ts : tempSeries) 166 { 167 HistogramSeries main = new HistogramSeries(ts.name, ts.getX(), ts.getY(), binSize, yAggregate, minX, maxX); 168 histogram.addSeries(main); 169 if (hiloAggregate != null) 170 { 171 hilo.addSeries(new HistogramSeries(ts.name, main, hiloAggregate)); 172 } 173 } 174 adjustRanges(); 175 plot.setRenderer(new XYStepRenderer()); 91 176 } 92 177 … … 94 179 { 95 180 return chart; 181 } 182 183 private static class TempSeries 184 { 185 final String name; 186 final List<Float> x; 187 final List<Float> y; 188 189 TempSeries(String name, int size, boolean hasY) 190 { 191 this.name = name; 192 this.x = new ArrayList<Float>(size); 193 this.y = hasY ? new ArrayList<Float>(size) : null; 194 } 195 196 public float[] getX() 197 { 198 if (x == null) return null; 199 float[] xf = new float[x.size()]; 200 int i = 0; 201 for (Float f : x) 202 { 203 xf[i++] = f.floatValue(); 204 } 205 return xf; 206 } 207 208 public float[] getY() 209 { 210 if (y == null) return null; 211 float[] yf = new float[y.size()]; 212 int i = 0; 213 for (Float f : y) 214 { 215 yf[i++] = f.floatValue(); 216 } 217 return yf; 218 } 219 96 220 } 97 221 … … 141 265 public double getXValue(int series, int item) 142 266 { 143 return all.get(series).getBin(item).getStartX(); 267 HistogramBin bin = all.get(series).getBin(item); 268 return (bin.getStartX() + bin.getEndX()) / 2; 144 269 } 145 270 … … 150 275 public double getYValue(int series, int item) 151 276 { 152 return all.get(series).get Y(item);277 return all.get(series).getMaxY(item); 153 278 } 154 279 // ------------------------------------------- … … 187 312 public double getStartYValue(int series, int item) 188 313 { 189 return 0;314 return all.get(series).getMinY(item); 190 315 } 191 316 // ------------------------------------------- 192 317 193 194 318 public void addSeries(HistogramSeries s) 195 319 { … … 197 321 } 198 322 } 199 323 200 324 201 325 private static class HistogramSeries … … 205 329 private final YAggregate yAggregate; 206 330 207 private HistogramSeries(String name, float[] xValues, float[] yValues, float binSize, YAggregate yAggregate )331 private HistogramSeries(String name, float[] xValues, float[] yValues, float binSize, YAggregate yAggregate, float xMin, float xMax) 208 332 { 209 333 this.name = name; … … 211 335 212 336 // Find max and min --> number of bins 213 float xMin = Float.MAX_VALUE; 214 float xMax = Float.MIN_VALUE; 215 for (float x : xValues) 216 { 217 if (xMax < x) xMax = x; 218 if (xMin > x) xMin = x; 337 if (Float.isNaN(xMin) || Float.isNaN(xMax)) 338 { 339 xMin = Float.MAX_VALUE; 340 xMax = Float.MIN_VALUE; 341 for (float x : xValues) 342 { 343 if (xMax < x) xMax = x; 344 if (xMin > x) xMin = x; 345 } 219 346 } 220 347 int numBins = 1 + (int)((xMax - xMin) / binSize); … … 243 370 } 244 371 372 private HistogramSeries(String name, HistogramSeries other, YAggregate yAggregate) 373 { 374 this.name = name; 375 this.bins = other.bins; 376 this.yAggregate = yAggregate; 377 } 378 245 379 public String getName() 246 380 { … … 258 392 } 259 393 260 public float getY(int index) 261 { 262 return yAggregate.getY(bins[index]); 394 public float getMaxY(int index) 395 { 396 return yAggregate.getMaxY(bins[index]); 397 } 398 public float getMinY(int index) 399 { 400 return yAggregate.getMinY(bins[index]); 263 401 } 264 402 } … … 271 409 private int count = 0; 272 410 private float sum = 0.0f; 411 private float squaredSum = 0.0f; 273 412 private float min = Float.MAX_VALUE; 274 413 private float max = Float.MIN_VALUE; … … 299 438 count++; 300 439 sum += y; 440 squaredSum += y * y; 301 441 if (y < min) min = y; 302 442 if (y > max) max = y; … … 326 466 return max; 327 467 } 468 public float getStdev() 469 { 470 return (float)Math.sqrt((squaredSum - sum * sum / count) / (count - 1)); 471 } 328 472 } 329 473 … … 333 477 COUNT 334 478 { 335 public float get Y(HistogramBin bin)479 public float getMaxY(HistogramBin bin) 336 480 { 337 481 return bin.getCount(); … … 340 484 SUM 341 485 { 342 public float get Y(HistogramBin bin)486 public float getMaxY(HistogramBin bin) 343 487 { 344 488 return bin.getSum(); … … 347 491 MEAN 348 492 { 349 public float get Y(HistogramBin bin)493 public float getMaxY(HistogramBin bin) 350 494 { 351 495 return bin.getMean(); … … 354 498 MAX 355 499 { 356 public float get Y(HistogramBin bin)500 public float getMaxY(HistogramBin bin) 357 501 { 358 502 return bin.getMax(); … … 361 505 MIN 362 506 { 363 public float get Y(HistogramBin bin)507 public float getMaxY(HistogramBin bin) 364 508 { 365 509 return bin.getMin(); 366 510 } 367 }; 368 369 public abstract float getY(HistogramBin bin); 511 }, 512 STDEV 513 { 514 public float getMaxY(HistogramBin bin) 515 { 516 return bin.getStdev(); 517 } 518 public float getMinY(HistogramBin bin) 519 { 520 return bin.getMean() - bin.getStdev(); 521 } 522 }, 523 HILOSTDEV 524 { 525 public float getMaxY(HistogramBin bin) 526 { 527 return bin.getMean() + bin.getStdev(); 528 } 529 public float getMinY(HistogramBin bin) 530 { 531 return bin.getMean() - bin.getStdev(); 532 } 533 534 }, 535 HILOMAXMIN 536 { 537 public float getMaxY(HistogramBin bin) 538 { 539 return bin.getMax(); 540 } 541 public float getMinY(HistogramBin bin) 542 { 543 return bin.getMin(); 544 } 545 } 546 ; 547 548 public abstract float getMaxY(HistogramBin bin); 549 public float getMinY(HistogramBin bin) 550 { 551 return 0; 552 } 370 553 371 554 } -
trunk/src/core/net/sf/basedb/util/plot/ScatterPlot.java
r2131 r2137 25 25 package net.sf.basedb.util.plot; 26 26 27 import net.sf.basedb.core.BaseException; 27 28 import net.sf.basedb.core.query.SqlResult; 28 29 import net.sf.basedb.core.query.SqlResultIterator; … … 37 38 38 39 import java.sql.SQLException; 40 import java.util.ArrayList; 41 import java.util.Collection; 42 import java.util.HashMap; 43 import java.util.List; 44 import java.util.Map; 39 45 40 46 … … 66 72 chart.setAntiAlias(false); 67 73 } 68 74 69 75 public void addData(SqlResultIterator data, String... names) 70 76 throws SQLException … … 73 79 for (int i = 0; i < names.length; ++i) 74 80 { 75 series[i] = new XYSeries(names[i]); 81 XYSeries s = new XYSeries(names[i]); 82 s.setNotify(false); 83 series[i] = s; 76 84 } 77 85 while (data.hasNext()) … … 90 98 } 91 99 100 public void addData(SqlResultIterator data, Collection<PlotAnnotation> annotations) 101 throws SQLException 102 { 103 Map<Integer, XYSeries> series = new HashMap<Integer, XYSeries>(annotations.size()); 104 List<XYSeries> newSeries = new ArrayList<XYSeries>(annotations.size()); 105 for (PlotAnnotation pa : annotations) 106 { 107 XYSeries s = new XYSeries(pa.getName()); 108 s.setNotify(false); 109 newSeries.add(s); 110 for (Integer column : pa.getColumns()) 111 { 112 if (series.containsKey(column)) 113 { 114 throw new BaseException("Column " + column + " has already been mapped to another series"); 115 } 116 series.put(column, s); 117 } 118 } 119 while (data.hasNext()) 120 { 121 SqlResult r = data.next(); 122 XYSeries s = series.get(r.getInt(1)); 123 s.add(r.getFloat(2), r.getFloat(3)); 124 } 125 for (XYSeries s : newSeries) 126 { 127 allSeries.addSeries(s); 128 } 129 } 130 92 131 public JFreeChart getChart() 93 132 { -
trunk/www/include/styles/tabcontrol.css
r2111 r2137 31 31 .tabcontrol, .tabcontrol_bottom { 32 32 border-left: 1px solid #999999; 33 margin-bottom: 4px;33 margin-bottom: 0px; 34 34 } 35 35 -
trunk/www/views/experiments/plotter/index.jsp
r2116 r2137 82 82 addFormulaOption(formulaOptions, f.getFormula(0), f.getName(), f.getDescription()); 83 83 } 84 addFormulaOption(formulaOptions, "raw('block')", "[Raw] Block", "Block number"); 85 addFormulaOption(formulaOptions, "raw('metaGridX')", "[Raw] Meta grid X", "Meta grid X coordinate"); 86 addFormulaOption(formulaOptions, "raw('metaGridY')", "[Raw] Meta grid Y", "Meta grid Y coordinate"); 87 addFormulaOption(formulaOptions, "raw('row')", "[Raw] Row", "Row number"); 88 addFormulaOption(formulaOptions, "raw('column')", "[Raw] Column", "Column number"); 89 addFormulaOption(formulaOptions, "raw('x')", "[Raw] X", "X coordinate"); 90 addFormulaOption(formulaOptions, "raw('y')", "[Raw] Y", "Y coordinate"); 84 91 for (RawDataProperty property : rdt.getProperties()) 85 92 { … … 91 98 } 92 99 100 // TODO - add extra columns to list of options 93 101 94 102 String title = HTML.encodeTags("Plot " + (ba == null ? bas.getName() : ba.getName())); … … 151 159 var index = list.selectedIndex; 152 160 formula.value = list[index].value; 153 label.value = list[index].text;161 if (list[index].value != '') label.value = list[index].text; 154 162 } 155 163 … … 162 170 frm.yPresets.disabled = isCount; 163 171 frm.yLog.disabled = isCount; 172 for (var i = 0; i < frm.hiloAggregate.length; i++) 173 { 174 frm.hiloAggregate[i].disabled = isCount; 175 } 164 176 if (isCount) 165 177 { 166 178 Main.removeClass(frm.yFormula, 'required'); 179 frm.yLabel.value = 'Count'; 167 180 } 168 181 else 169 182 { 170 183 Main.addClass(frm.yFormula, 'required'); 184 var yPreset = frm.yPresets[frm.yPresets.selectedIndex]; 185 if (yPreset.value != '') frm.yLabel.value = yPreset.text; 171 186 } 172 187 } … … 196 211 url += '&yLog='+(frm.yLog.checked ? 1 : 0); 197 212 url += '&yLabel='+Main.encodeURI(frm.yLabel.value); 213 if (frm.annotation) 214 { 215 url += '&annotation='+frm.annotation[frm.annotation.selectedIndex].value; 216 } 198 217 } 199 218 else … … 211 230 url += '&y='+Main.encodeURI(frm.yFormula.value); 212 231 url += '&yLog='+(frm.yLog.checked ? 1 : 0); 232 url += '&hiloAggregate='+Forms.getCheckedRadio(frm.hiloAggregate).value 213 233 } 214 234 url += '&yLabel='+Main.encodeURI(frm.yLabel.value); 235 if (frm.annotation) 236 { 237 url += '&annotation='+frm.annotation[frm.annotation.selectedIndex].value; 238 } 215 239 } 216 240 return url; … … 288 312 <div class="boxed"> 289 313 290 <table class="form" >291 <tr valign=" top">314 <table class="form" border="0" cellspacing="0" cellpadding="2"> 315 <tr valign="bottom"> 292 316 <td width="50%"> 293 317 … … 297 321 <td class="prompt">Plot title</td> 298 322 <td colspan="2"><input type="text" class="text" size="30" maxlength="255" name="title" 299 value="<%=HTML.encodeTags(ba .getName())%>"></td>323 value="<%=HTML.encodeTags(ba == null ? bas.getName() : ba.getName())%>"></td> 300 324 </tr> 301 325 <tr> … … 315 339 <p> 316 340 317 <t:tabcontrol id="plotType" contentstyle="<%="height: "+(int)(scale* 260)+"px;"%>">341 <t:tabcontrol id="plotType" contentstyle="<%="height: "+(int)(scale*340)+"px;"%>"> 318 342 <t:tab id="scatter" title="Scatter plot"> 319 343 <form name="scatter"> … … 371 395 <td><input type="checkbox" name="xLog" value="1"></td> 372 396 </tr> 397 <% 398 if (ba == null) 399 { 400 %> 401 <tr> 402 <td class="prompt">Annotation</td> 403 <td> 404 <select name="annotation"> 405 <option value="">- none - 406 <option value="bioassay">Bioassay 407 </select> 408 </td> 409 </tr> 410 <% 411 } 412 %> 373 413 </table> 374 414 </form> … … 383 423 <input type="radio" name="yAggregate" value="count" checked onchange="aggregateOnChange()"> Count 384 424 <input type="radio" name="yAggregate" value="mean" onchange="aggregateOnChange()"> Mean 385 <input type="radio" name="yAggregate" value="max" onchange="aggregateOnChange()"> Max 386 <input type="radio" name="yAggregate" value="min" onchange="aggregateOnChange()"> Min 425 </td> 426 </tr> 427 <tr> 428 <td> Hi-lo</td> 429 <td> 430 <input type="radio" name="hiloAggregate" value="" checked> None 431 <input type="radio" name="hiloAggregate" value="hilomaxmin"> Min/Max 432 <input type="radio" name="hiloAggregate" value="hilostdev"> Stdev 387 433 </td> 388 434 </tr> … … 444 490 <td><input type="text" class="text" name="binSize" value="1"></td> 445 491 </tr> 492 <% 493 if (ba == null) 494 { 495 %> 496 <tr> 497 <td class="prompt">Annotation</td> 498 <td> 499 <select name="annotation"> 500 <option value="">- none - 501 <option value="bioassay">Bioassay 502 </select> 503 </td> 504 </tr> 505 <% 506 } 507 %> 446 508 </table> 447 509 </form> 448 449 510 </t:tab> 450 511 </t:tabcontrol> 451 452 <base:buttongroup>453 <base:button title="Preview" onclick="previewPlot()" tooltip="Generate a preview of the plot" />454 <base:button title="View…" onclick="viewPlot()" tooltip="View a fullsized version of the plot (in a popup)" />455 <base:button title="Download…" onclick="downloadPlot()" tooltip="Downlad a fullsized version of the plot to you computer" />456 <base:button title="Save as…" onclick="savePlotAs()" tooltip="Save a fullsized version of the plot on the BASE server" />457 </base:buttongroup>458 459 512 </td> 460 513 <td width="50%"> 461 514 <div style="position: relative; top: 0px; left: 0px; border: 10px solid #00000;"> 462 515 <img src="../../../images/plot_empty.png" id="background" 463 style="position: absolute; top: 0px; left: 0px; z-index: 1; ">516 style="position: absolute; top: 0px; left: 0px; z-index: 1; border: 1px solid #999999;"> 464 517 <img src="../../../images/plot_select.gif" id="preview" 465 style="position: relative; top: 0px; left: 0px; z-index: 2; ">518 style="position: relative; top: 0px; left: 0px; z-index: 2; border: 1px solid #999999;"> 466 519 </div> 467 520 </td> 468 521 </tr> 469 522 </table> 470 471 523 </div> 472 473 <table align="center"> 474 <tr> 475 <td><base:button onclick="window.close()" title="Close" /></td> 476 </tr> 477 </table> 524 <p> 525 <div align="center"> 526 <base:buttongroup> 527 <base:button title="Preview" onclick="previewPlot()" 528 tooltip="Generate a preview of the plot" /> 529 <base:button title="View…" onclick="viewPlot()" 530 tooltip="View a fullsized version of the plot (in a popup)" /> 531 <base:button title="Download…" onclick="downloadPlot()" 532 tooltip="Downlad a fullsized version of the plot to you computer" /> 533 <base:button title="Save as…" onclick="savePlotAs()" 534 tooltip="Save a fullsized version of the plot on the BASE server" /> 535 <base:button onclick="window.close()" title="Close" /> 536 </base:buttongroup> 537 </div> 478 538 479 539 </base:body>
Note: See TracChangeset
for help on using the changeset viewer.