Skip to content

Commit 24a1a04

Browse files
committed
Synced GridLineConfiguration from ChartJS source code / improved Types for more options
Fixes #289
1 parent 7f77dc7 commit 24a1a04

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 2.6.0
22
* Synced ``Doughnut/PieOptions`` from ChartJS source code #293
3+
* Synced ``GridLineConfiguration`` from ChartJS source code / improved Types for more options #289
34
* Updated dependencies
45

56
## 2.5.0

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/scale/GridLineConfiguration.java

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,24 @@
1515
*/
1616
package software.xdev.chartjs.model.options.scale;
1717

18-
import java.util.List;
19-
2018
import software.xdev.chartjs.model.objects.OptionalArray;
2119

2220

2321
/**
24-
* @see <a href="https://github.com/chartjs/Chart.js/blob/v4.4.3/src/types/index.d.ts#L2971">ChartJS Source</a>
22+
* @see <a href="https://github.com/chartjs/Chart.js/blob/v4.4.7/src/types/index.d.ts#L2977">ChartJS Source</a>
2523
*/
2624
public class GridLineConfiguration
2725
{
2826
protected Boolean display;
2927
protected Boolean circular;
3028
protected Object color;
31-
protected Number lineWidth;
29+
protected Object lineWidth;
3230
protected Boolean drawOnChartArea;
3331
protected Boolean drawTicks;
34-
protected List<Number> tickBorderDash = new OptionalArray<>();
35-
protected Number tickBorderDashOffset;
32+
protected Object tickBorderDash = new OptionalArray<>();
33+
protected Object tickBorderDashOffset;
3634
protected Object tickColor;
35+
protected Number tickLength;
3736
protected Number tickWidth;
3837
protected Boolean offset;
3938
protected Number z;
@@ -71,12 +70,12 @@ public GridLineConfiguration setColor(final Object color)
7170
return this;
7271
}
7372

74-
public Number getLineWidth()
73+
public Object getLineWidth()
7574
{
7675
return this.lineWidth;
7776
}
7877

79-
public GridLineConfiguration setLineWidth(final Number lineWidth)
78+
public GridLineConfiguration setLineWidth(final Object lineWidth)
8079
{
8180
this.lineWidth = lineWidth;
8281
return this;
@@ -104,23 +103,23 @@ public GridLineConfiguration setDrawTicks(final Boolean drawTicks)
104103
return this;
105104
}
106105

107-
public List<Number> getTickBorderDash()
106+
public Object getTickBorderDash()
108107
{
109108
return this.tickBorderDash;
110109
}
111110

112-
public GridLineConfiguration setTickBorderDash(final List<Number> tickBorderDash)
111+
public GridLineConfiguration setTickBorderDash(final Object tickBorderDash)
113112
{
114113
this.tickBorderDash = tickBorderDash;
115114
return this;
116115
}
117116

118-
public Number getTickBorderDashOffset()
117+
public Object getTickBorderDashOffset()
119118
{
120119
return this.tickBorderDashOffset;
121120
}
122121

123-
public GridLineConfiguration setTickBorderDashOffset(final Number tickBorderDashOffset)
122+
public GridLineConfiguration setTickBorderDashOffset(final Object tickBorderDashOffset)
124123
{
125124
this.tickBorderDashOffset = tickBorderDashOffset;
126125
return this;
@@ -137,6 +136,16 @@ public GridLineConfiguration setTickColor(final Object tickColor)
137136
return this;
138137
}
139138

139+
public Number getTickLength()
140+
{
141+
return this.tickLength;
142+
}
143+
144+
public void setTickLength(final Number tickLength)
145+
{
146+
this.tickLength = tickLength;
147+
}
148+
140149
public Number getTickWidth()
141150
{
142151
return this.tickWidth;

0 commit comments

Comments
 (0)