public class UIUtils extends Object
Constructor and Description |
---|
UIUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
formatDuration(long durationMs)
Format the duration in milliseconds to a human readable String, with "yr", "days", "hr" etc prefixes
|
static double[] |
graphNiceRange(double max,
double min,
int nTick)
Convert the "messy" min/max values on a dataset to something clean.
|
static double |
niceNum(double x,
boolean round) |
public static double[] graphNiceRange(double max, double min, int nTick)
max
- Maximum data point valuemin
- Minimum data point valuenTick
- Number of tick marks desired on chart (good setting: 5)public static double niceNum(double x, boolean round)
public static String formatDuration(long durationMs)
durationMs
- Duration in millisecondsCopyright © 2020. All rights reserved.