Skip to content

Commit 9a2cd9f

Browse files
committed
reverse property should be on the Scale object
Fixes #145
1 parent 07ea6f5 commit 9a2cd9f

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Add subtitle option #141 (@aripddev)
33
* Add ``PointStyle#rectRounded`` #143 (@aripddev)
44
* Add ``BubbleDataset#pointStyle`` #144 (@aripddev)
5+
* ``reverse`` property should be on the ``Scale`` object #145
56

67
## 1.3.0
78
* Allows creation of mixed charts #128

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/scales/Scale.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class Scale<T extends Ticks<T>, S extends Scale<T, S>>
5050
protected GridLines gridLines;
5151
protected ScaleTitle title;
5252
protected Boolean stacked;
53+
protected Boolean reverse;
5354

5455
/**
5556
* @see #setTicks(Ticks)
@@ -567,6 +568,30 @@ public S setStacked(final Boolean stacked)
567568
return this.self();
568569
}
569570

571+
/**
572+
* @see #setReverse(Boolean)
573+
*/
574+
public Boolean getReverse()
575+
{
576+
return this.reverse;
577+
}
578+
579+
/**
580+
* <p>
581+
* Reverses order of tick labels.
582+
* </p>
583+
*
584+
* <p>
585+
* Default {@code false}
586+
* </p>
587+
*/
588+
public S setReverse(final Boolean reverse)
589+
{
590+
this.reverse = reverse;
591+
return this.self();
592+
}
593+
594+
@SuppressWarnings("unchecked")
570595
protected S self()
571596
{
572597
return (S)this;

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/ticks/Ticks.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public class Ticks<T extends Ticks<T>>
4141
protected BigDecimal minRotation;
4242
protected Boolean mirror;
4343
protected BigDecimal padding;
44-
protected Boolean reverse;
4544

4645
/**
4746
* @see #setAutoSkip(Boolean)
@@ -360,28 +359,4 @@ public T setPadding(final BigDecimal padding)
360359
this.padding = padding;
361360
return (T)this;
362361
}
363-
364-
/**
365-
* @see #setReverse(Boolean)
366-
*/
367-
public Boolean getReverse()
368-
{
369-
return this.reverse;
370-
}
371-
372-
/**
373-
* <p>
374-
* Reverses order of tick labels.
375-
* </p>
376-
*
377-
* <p>
378-
* Default {@code false}
379-
* </p>
380-
*/
381-
@SuppressWarnings("unchecked")
382-
public T setReverse(final Boolean reverse)
383-
{
384-
this.reverse = reverse;
385-
return (T)this;
386-
}
387362
}

0 commit comments

Comments
 (0)