forked from LupusNobilis/java-org.hwo.ui
Fix JDiagram.autoscale() to work in zoomed view
parent
059163730f
commit
f3382684ba
|
@ -412,17 +412,22 @@ public class JDiagram extends JComponent implements PlotProviderListener, Bounde
|
||||||
max = new Double[this.plotProvider.getMaxOrdinate()+1];
|
max = new Double[this.plotProvider.getMaxOrdinate()+1];
|
||||||
min = new Double[this.plotProvider.getMaxOrdinate()+1];
|
min = new Double[this.plotProvider.getMaxOrdinate()+1];
|
||||||
|
|
||||||
for (int graph=0; graph < this.plotProvider.getNumGraphs(); graph++){
|
for (int n=0;n<this.plotProvider.getLength(); n++){
|
||||||
ordinate = this.plotProvider.getOrdinate(graph);
|
for (int graph=0; graph < this.plotProvider.getNumGraphs(); graph++){
|
||||||
for (int n=0;n<this.plotProvider.getLength(); n++){
|
double pos = this.plotProvider.getPosition(n,graph);
|
||||||
Float value = this.plotProvider.getValue(n, graph);
|
|
||||||
if (value != null)
|
if ((pos >= abszissMinimum) && (pos < (abszissMinimum + abszissWindow))){
|
||||||
{
|
ordinate = this.plotProvider.getOrdinate(graph);
|
||||||
if ((min[ordinate] == null) || (value < min[ordinate]))
|
|
||||||
min[ordinate] = value.doubleValue();
|
Float value = this.plotProvider.getValue(n, graph);
|
||||||
if ((max[ordinate] == null) || (value > max[ordinate]))
|
if (value != null)
|
||||||
max[ordinate] = value.doubleValue();
|
{
|
||||||
};
|
if ((min[ordinate] == null) || (value < min[ordinate]))
|
||||||
|
min[ordinate] = value.doubleValue();
|
||||||
|
if ((max[ordinate] == null) || (value > max[ordinate]))
|
||||||
|
max[ordinate] = value.doubleValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue