All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.gsi.chart.axes.TickUnitSupplier Maven / Gradle / Ivy

Go to download

This charting library ${project.artifactId}- is an extension in the spirit of Oracle's XYChart and performance/time-proven JDataViewer charting functionalities. Emphasis was put on plotting performance for both large number of data points and real-time displays, as well as scientific accuracies leading to error bar/surface plots, and other scientific plotting features (parameter measurements, fitting, multiple axes, zoom, ...).

There is a newer version: 11.2.7
Show newest version
/**
 * Copyright (c) 2016 European Organisation for Nuclear Research (CERN), All Rights Reserved.
 */

package de.gsi.chart.axes;

import de.gsi.chart.axes.spi.DefaultNumericAxis;

/**
 * Supplier of Axis tick units that is expected to compute a tick unit that is equal or greater than the one given as
 * argument. In case the calculated tick labels don't fit on the axis, the {@link #computeTickUnit(double)} method is
 * called again with a grater reference unit so that the supplier can calculate next bigger value of the tick unit.
 * 

* If the {@link #computeTickUnit(double)} returns value that is smaller than the reference unit, the value will be used * without further checks which may result in tick labels overlapping. *

* If the {@link #computeTickUnit(double)} returns value smaller than or equal to zero, IllegalArgumentException will be * thrown at runtime. * * @author Grzegorz Kruk */ @FunctionalInterface public interface TickUnitSupplier { /** * Should return tick unit that is equal or grater to the given reference tick unit. * * @param referenceTickUnit reference tick unit * @return the computed unit that is equal or grater to the specified one */ double computeTickUnit(double referenceTickUnit); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy