Skip to content

Commit

Permalink
Restored DisplayFormats
Browse files Browse the repository at this point in the history
Fixes #186
  • Loading branch information
AB-xdev committed Jun 14, 2024
1 parent 1dca8a2 commit 8d0d79a
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,122 @@ public Adapters setDate(final Object date)
return this;
}
}


/**
* Reference structure for {@link TimeScaleOptions#time}.
*
* @see <a href="https://www.chartjs.org/docs/latest/axes/cartesian/time.html#display-formats">ChartJS Docs</a>
*/
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;
}
}
}

0 comments on commit 8d0d79a

Please sign in to comment.