diff --git a/CHANGELOG.md b/CHANGELOG.md index 406e8a9..0b2d1c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.0.1 +* Restored ``DisplayFormats`` #186 + ## 2.0.0 * Scales have been reworked and are now nearly identical to the [types defined in ChartJS](https://github.com/chartjs/Chart.js/blob/v4.4.3/src/types/index.d.ts) * The use of ``Color`` for various coloring related options is no longer required. diff --git a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/scale/cartesian/time/TimeScaleOptions.java b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/scale/cartesian/time/TimeScaleOptions.java index 5472af8..6588938 100644 --- a/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/scale/cartesian/time/TimeScaleOptions.java +++ b/chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/scale/cartesian/time/TimeScaleOptions.java @@ -204,4 +204,122 @@ public Adapters setDate(final Object date) return this; } } + + + /** + * Reference structure for {@link TimeScaleOptions#time}. + * + * @see ChartJS Docs + */ + public static class DisplayFormats + { + protected String millisecond; + protected String second; + protected String minute; + protected String hour; + protected String day; + protected String week; + protected String month; + protected String quarter; + protected String year; + + public String getMillisecond() + { + return this.millisecond; + } + + public DisplayFormats setMillisecond(final String millisecond) + { + this.millisecond = millisecond; + return this; + } + + public String getSecond() + { + return this.second; + } + + public DisplayFormats setSecond(final String second) + { + this.second = second; + return this; + } + + public String getMinute() + { + return this.minute; + } + + public DisplayFormats setMinute(final String minute) + { + this.minute = minute; + return this; + } + + public String getHour() + { + return this.hour; + } + + public DisplayFormats setHour(final String hour) + { + this.hour = hour; + return this; + } + + public String getDay() + { + return this.day; + } + + public DisplayFormats setDay(final String day) + { + this.day = day; + return this; + } + + public String getWeek() + { + return this.week; + } + + public DisplayFormats setWeek(final String week) + { + this.week = week; + return this; + } + + public String getMonth() + { + return this.month; + } + + public DisplayFormats setMonth(final String month) + { + this.month = month; + return this; + } + + public String getQuarter() + { + return this.quarter; + } + + public DisplayFormats setQuarter(final String quarter) + { + this.quarter = quarter; + return this; + } + + public String getYear() + { + return this.year; + } + + public DisplayFormats setYear(final String year) + { + this.year = year; + return this; + } + } }