
nl.pvanassen.highchart.api.format.DateTimeLabelFormats Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of highchart-java-api Show documentation
Show all versions of highchart-java-api Show documentation
A Java API to generate highchart json on the server side.
The newest version!
package nl.pvanassen.highchart.api.format;
import java.util.HashMap;
import java.util.Map;
import nl.pvanassen.highchart.api.base.BaseObject;
public class DateTimeLabelFormats extends BaseObject {
public enum TimeUnit {
SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR;
}
private Map formats;
public DateTimeLabelFormats() {
formats = null;
}
public String getFormat(TimeUnit unit) {
return formats != null ? formats.get(unit) : null;
}
public Map getFormats() {
return formats;
}
public DateTimeLabelFormats set(TimeUnit unit, String format) {
if (formats == null) {
formats = new HashMap();
}
formats.put(unit, format);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy