Class ChartUtils
- java.lang.Object
-
- adams.gui.visualization.xchart.dataset.ChartUtils
-
public class ChartUtils extends Object
Helper methods for charts.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_DIAGONAL
-
Constructor Summary
Constructors Constructor Description ChartUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddDiagonal(Datasets<XYDataset> dataset, double min, double max)Adds a diagonal to the dataset in the first position.static booleanhasDiagonal(Datasets<? extends Dataset> datasets)Checks the datasets whether a diagonal series is present.static booleanhasDiagonal(org.knowm.xchart.internal.chartpart.Chart chart)Checks the chart whether a diagonal series is present.static booleanisDiagonal(Dataset dataset)Checks the dataset whether it is the one for the diagonal.static booleanisDiagonal(org.knowm.xchart.internal.series.Series series)Checks the series whether it is the one for the diagonal.static voidsetMarkers(org.knowm.xchart.internal.chartpart.Chart chart, AbstractMarkerGenerator generator)Sets the markers.
-
-
-
Field Detail
-
KEY_DIAGONAL
public static final String KEY_DIAGONAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
addDiagonal
public static void addDiagonal(Datasets<XYDataset> dataset, double min, double max)
Adds a diagonal to the dataset in the first position.- Parameters:
dataset- the dataset to add the diagonal tomin- the minimum Ymax- the maximum Y
-
hasDiagonal
public static boolean hasDiagonal(org.knowm.xchart.internal.chartpart.Chart chart)
Checks the chart whether a diagonal series is present.- Parameters:
chart- the chart to check- Returns:
- true if present
-
hasDiagonal
public static boolean hasDiagonal(Datasets<? extends Dataset> datasets)
Checks the datasets whether a diagonal series is present.- Parameters:
datasets- the datasets to check- Returns:
- true if present
-
isDiagonal
public static boolean isDiagonal(Dataset dataset)
Checks the dataset whether it is the one for the diagonal.- Parameters:
dataset- the dataset to check- Returns:
- true if present
-
isDiagonal
public static boolean isDiagonal(org.knowm.xchart.internal.series.Series series)
Checks the series whether it is the one for the diagonal.- Parameters:
series- the series to check- Returns:
- true if present
-
setMarkers
public static void setMarkers(org.knowm.xchart.internal.chartpart.Chart chart, AbstractMarkerGenerator generator)Sets the markers.- Parameters:
chart- the chart to updategenerator- the marker generator
-
-