Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GridLines options for YAxis #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/main/java/be/ceau/chart/options/scales/YAxis.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ public class YAxis<T extends Ticks<T>> {
* @see #setStacked(Boolean stacked)
*/
private Boolean stacked;


/**
* Default {@code offsetGridLines == true}
*
* @see #setGridLines(GridLines gridLines)
*/
private GridLines gridLines;

/**
* @see #setTicks(Ticks)
Expand Down Expand Up @@ -133,5 +141,23 @@ public YAxis<T> setStacked(Boolean stacked) {
this.stacked = stacked;
return this;
}


/**
* @see #setGridLines(GridLines gridLines)
*/
public GridLines getGridLines() {
return this.gridLines;
}

/**
* If true, the bars for a particular data point fall between the grid lines. The grid line will
* move to the left by one half of the tick interval. If false, the grid line will go right down the
* middle of the bars.
*/
public YAxis<T> setGridLines(GridLines gridLines) {
this.gridLines = gridLines;
return this;
}

}