本文整理了Java中org.jfree.data.xy.XYSeries.maxIgnoreNaN()
方法的一些代码示例,展示了XYSeries.maxIgnoreNaN()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYSeries.maxIgnoreNaN()
方法的具体详情如下:
包路径:org.jfree.data.xy.XYSeries
类名称:XYSeries
方法名:maxIgnoreNaN
[英]A function to find the maximum of two values, but ignoring any Double.NaN values.
[中]一个函数,用于查找两个值中的最大值,但忽略任何双精度值。南的价值观。
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Updates the cached values for the minimum and maximum data values.
*
* @param item the item added (<code>null</code> not permitted).
*
* @since 1.0.13
*/
private void updateBoundsForAddedItem(XYDataItem item) {
double x = item.getXValue();
this.minX = minIgnoreNaN(this.minX, x);
this.maxX = maxIgnoreNaN(this.maxX, x);
if (item.getY() != null) {
double y = item.getYValue();
this.minY = minIgnoreNaN(this.minY, y);
this.maxY = maxIgnoreNaN(this.maxY, y);
}
}
代码示例来源:origin: jfree/jfreechart
/**
* Updates the cached values for the minimum and maximum data values.
*
* @param item the item added ({@code null} not permitted).
*
* @since 1.0.13
*/
private void updateBoundsForAddedItem(XYDataItem item) {
double x = item.getXValue();
this.minX = minIgnoreNaN(this.minX, x);
this.maxX = maxIgnoreNaN(this.maxX, x);
if (item.getY() != null) {
double y = item.getYValue();
this.minY = minIgnoreNaN(this.minY, y);
this.maxY = maxIgnoreNaN(this.maxY, y);
}
}
代码示例来源:origin: jfree/jfreechart
/**
* Updates the value of an item in the series and sends a
* {@link SeriesChangeEvent} to all registered listeners.
*
* @param index the item (zero based index).
* @param y the new value ({@code null} permitted).
*
* @since 1.0.1
*/
public void updateByIndex(int index, Number y) {
XYDataItem item = getRawDataItem(index);
// figure out if we need to iterate through all the y-values
boolean iterate = false;
double oldY = item.getYValue();
if (!Double.isNaN(oldY)) {
iterate = oldY <= this.minY || oldY >= this.maxY;
}
item.setY(y);
if (iterate) {
findBoundsByIteration();
}
else if (y != null) {
double yy = y.doubleValue();
this.minY = minIgnoreNaN(this.minY, yy);
this.maxY = maxIgnoreNaN(this.maxY, yy);
}
fireSeriesChanged();
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Updates the value of an item in the series and sends a
* {@link SeriesChangeEvent} to all registered listeners.
*
* @param index the item (zero based index).
* @param y the new value (<code>null</code> permitted).
*
* @deprecated Renamed {@link #updateByIndex(int, Number)} to avoid
* confusion with the {@link #update(Number, Number)} method.
*/
public void update(int index, Number y) {
XYDataItem item = getRawDataItem(index);
// figure out if we need to iterate through all the y-values
boolean iterate = false;
double oldY = item.getYValue();
if (!Double.isNaN(oldY)) {
iterate = oldY <= this.minY || oldY >= this.maxY;
}
item.setY(y);
if (iterate) {
findBoundsByIteration();
}
else if (y != null) {
double yy = y.doubleValue();
this.minY = minIgnoreNaN(this.minY, yy);
this.maxY = maxIgnoreNaN(this.maxY, yy);
}
fireSeriesChanged();
}
代码示例来源:origin: jfree/jfreechart
double yy = item.getY().doubleValue();
this.minY = minIgnoreNaN(this.minY, yy);
this.maxY = maxIgnoreNaN(this.maxY, yy);
内容来源于网络,如有侵权,请联系作者删除!