Skip to content

Commit f3da923

Browse files
committed
Deprecate Fill
1 parent 758d118 commit f3da923

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

chartjs-java-model/src/main/java/software/xdev/chartjs/model/dataset/PointDataset.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@
2121
import software.xdev.chartjs.model.enums.BorderCapStyle;
2222
import software.xdev.chartjs.model.enums.BorderJoinStyle;
2323
import software.xdev.chartjs.model.objects.OptionalArray;
24-
import software.xdev.chartjs.model.options.elements.Fill;
2524

2625

2726
public abstract class PointDataset<T extends Dataset<T, O>, O> extends Dataset<T, O>
2827
{
29-
private Fill<?> fill;
28+
private Object fill;
3029

3130
private Float lineTension;
3231

@@ -64,18 +63,12 @@ public abstract class PointDataset<T extends Dataset<T, O>, O> extends Dataset<T
6463

6564
private final List<Object> pointStyle = new OptionalArray<>();
6665

67-
/**
68-
* @see #setFill(Fill)
69-
*/
70-
public Fill getFill()
66+
public Object getFill()
7167
{
7268
return this.fill;
7369
}
7470

75-
/**
76-
* If true, fill the area under the line
77-
*/
78-
public T setFill(final Fill<?> fill)
71+
public T setFill(final Object fill)
7972
{
8073
this.fill = fill;
8174
return this.self();

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/elements/Fill.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
* <p>
2525
* Option on the dataset object which can be used to create area between two datasets or a dataset and a boundary.
2626
* </p>
27+
* @deprecated Use corresponding data type like <code>Boolean</code> or <code>String</code> directly.
28+
* All internal usages have been replaced by <code>Object</code>.
2729
*/
30+
@Deprecated
2831
public class Fill<T>
2932
{
3033
@SuppressWarnings("java:S1700") // Used inside JSON model

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/elements/Line.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class Line
4141
protected Float borderDashOffset;
4242
protected BorderJoinStyle borderJoinStyle;
4343
protected Boolean capBezierPoints;
44-
protected Fill<?> fill;
44+
protected Object fill;
4545
protected Boolean stepped;
4646

4747
/**
@@ -277,10 +277,7 @@ public Line setCapBezierPoints(final Boolean capBezierPoints)
277277
return this;
278278
}
279279

280-
/**
281-
* @see #setFill(Fill)
282-
*/
283-
public Fill getFill()
280+
public Object getFill()
284281
{
285282
return this.fill;
286283
}
@@ -294,7 +291,7 @@ public Fill getFill()
294291
* Default {@code true}
295292
* </p>
296293
*/
297-
public Line setFill(final Fill<?> fill)
294+
public Line setFill(final Object fill)
298295
{
299296
this.fill = fill;
300297
return this;

0 commit comments

Comments
 (0)