Omaha #5073 - Fixed issue with Time Series Display.
Former-commit-id: ef723c22c0cb54c0a6448696455349d8b4195bca
This commit is contained in:
parent
2c30773ad0
commit
7c34074e52
2 changed files with 21 additions and 14 deletions
|
@ -140,7 +140,9 @@ import com.raytheon.viz.hydrocommon.util.DbUtils;
|
||||||
* 06 May 2013 1976 mpduff Refactored Hydro time series data access.
|
* 06 May 2013 1976 mpduff Refactored Hydro time series data access.
|
||||||
* 29 May 2013 2016 mpduff Fix TS Toggle Traces.
|
* 29 May 2013 2016 mpduff Fix TS Toggle Traces.
|
||||||
* 05 Sep 2013 #2332 lvenable Fixed memory leaks.
|
* 05 Sep 2013 #2332 lvenable Fixed memory leaks.
|
||||||
* 24 Jan 2013 15959 lbousaidi Swap the corner points of the bounding box when zooming.
|
* 24 Jan 2013 15959 lbousaidi Swap the corner points of the bounding box when zooming.
|
||||||
|
* Nov 18 2015 5073 skorolev Fixed drawing PP time series.
|
||||||
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*
|
*
|
||||||
|
@ -841,7 +843,8 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Precipitation physical element */
|
/* Precipitation physical element */
|
||||||
if (td.getPe().equalsIgnoreCase(HydroConstants.PP)) {
|
if (td.getPe().equalsIgnoreCase(HydroConstants.PP)
|
||||||
|
&& td.isTraceOn()) {
|
||||||
precipPE = true;
|
precipPE = true;
|
||||||
setBackgroundColor(td, j, gc);
|
setBackgroundColor(td, j, gc);
|
||||||
int[] ia = new int[8];
|
int[] ia = new int[8];
|
||||||
|
@ -1242,12 +1245,12 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements
|
||||||
}
|
}
|
||||||
Date xMin = pixel2x(gd, rubberBandX1 - GRAPHBORDER_LEFT);
|
Date xMin = pixel2x(gd, rubberBandX1 - GRAPHBORDER_LEFT);
|
||||||
Date xMax = pixel2x(gd, rubberBandX2 - GRAPHBORDER_LEFT);
|
Date xMax = pixel2x(gd, rubberBandX2 - GRAPHBORDER_LEFT);
|
||||||
//Swap the corner points of the bounding box when zooming
|
// Swap the corner points of the bounding box when zooming
|
||||||
if (xMin.after(xMax)) {
|
if (xMin.after(xMax)) {
|
||||||
Date xtmp;
|
Date xtmp;
|
||||||
xtmp= xMin;
|
xtmp = xMin;
|
||||||
xMin=xMax;
|
xMin = xMax;
|
||||||
xMax=xtmp;
|
xMax = xtmp;
|
||||||
}
|
}
|
||||||
gd.setXMin(xMin);
|
gd.setXMin(xMin);
|
||||||
gd.setXMax(xMax);
|
gd.setXMax(xMax);
|
||||||
|
@ -1263,12 +1266,12 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements
|
||||||
if (ymin < gd.getYmin()) {
|
if (ymin < gd.getYmin()) {
|
||||||
ymin = gd.getYmin();
|
ymin = gd.getYmin();
|
||||||
}
|
}
|
||||||
//Swap the corner points of the bounding box when zooming
|
// Swap the corner points of the bounding box when zooming
|
||||||
if (ymin > ymax) {
|
if (ymin > ymax) {
|
||||||
double ytmp;
|
double ytmp;
|
||||||
ytmp= ymin;
|
ytmp = ymin;
|
||||||
ymin=ymax;
|
ymin = ymax;
|
||||||
ymax=ytmp;
|
ymax = ytmp;
|
||||||
}
|
}
|
||||||
gd.setYmin(ymin);
|
gd.setYmin(ymin);
|
||||||
gd.setYmax(ymax);
|
gd.setYmax(ymax);
|
||||||
|
|
|
@ -70,6 +70,7 @@ import com.raytheon.viz.hydrocommon.HydroConstants;
|
||||||
* 06 Nov 2012 15399 wkwock Fix refine the plot algorithm and sampling algorithm
|
* 06 Nov 2012 15399 wkwock Fix refine the plot algorithm and sampling algorithm
|
||||||
* May 06, 2013 1976 mpduff Code cleanup
|
* May 06, 2013 1976 mpduff Code cleanup
|
||||||
* 05Sep2013 #2332 lvenable Fixed memory leaks.
|
* 05Sep2013 #2332 lvenable Fixed memory leaks.
|
||||||
|
* Nov 18, 2015 5073 skorolev Fixed y2pixel.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author mpduff
|
* @author mpduff
|
||||||
|
@ -624,8 +625,11 @@ public class TimeSeriesGraphCanvas extends Canvas {
|
||||||
}
|
}
|
||||||
double yDiff = gd.getYmax() - gd.getYmin();
|
double yDiff = gd.getYmax() - gd.getYmin();
|
||||||
double yValue = (graphAreaHeight / yDiff) * (y - gd.getYmin());
|
double yValue = (graphAreaHeight / yDiff) * (y - gd.getYmin());
|
||||||
|
if (yValue < 0) {
|
||||||
return (int) (graphAreaHeight - Math.round(yValue));
|
return graphAreaHeight;
|
||||||
|
} else {
|
||||||
|
return (int) (graphAreaHeight - Math.round(yValue));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue