private String secondAxisUnit;
private UnitType axisUnitType = UnitType.DECIMAL;
- private double underBoundValue;
+ private double boundValue = -1;
public void setBoundValue(double value) {
- underBoundValue = value;
+ boundValue = value;
}
public double getBoundValue() {
- return underBoundValue;
+ return boundValue;
}
private BoundType boundType;
}
double maxY = getMaxYToDraw(series, index);
- double boundValue = plot.getBoundValue();
for (int i = index; i < seriesItemSize; i++) {
seriesItem = seriesItems.get(i);
} else {
DAChartPlot.BoundType boundType = plot.getBoundType();
if(boundType != null) {
+ double boundValue = plot.getBoundValue();
if(boundType == DAChartPlot.BoundType.UNDER) {
- if(seriesItem.getY() < boundValue) {
- gc.setBackground(ColorResources.DARK_YELLOW);
- }
+ gc.setBackground(ColorResources.DARK_YELLOW);
} else {
- if(seriesItem.getY() > boundValue) {
+ if(boundValue != -1 && seriesItem.getY() > boundValue) {
gc.setBackground(ColorResources.DARK_YELLOW);
}
}
if (boundLineWidth == LINE_MAX_WIDTH) {
String boundText = String.valueOf(boundValue)
+ plot.getAxisUnit();
- plot.setBoundValue(boundValue);
chart.redrawForce();
int boundTextHeight = e.gc.textExtent(boundText).y;
int boundTextPosition;
position = UPPER_LINE_INIT_POSITION + 0.01;
}
boundValue = Math.round(plot.getVisibleEndY() * (1 - position));
+ plot.setBoundValue(boundValue);
}
} else {