Skip to content

Commit 90920ed

Browse files
authored
Merge pull request #164 from xdev-software/develop
Release
2 parents 0417dbd + b86054c commit 90920ed

File tree

18 files changed

+192
-245
lines changed

18 files changed

+192
-245
lines changed

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.4.1
2+
* Use ``Number`` instead of ``BigDecimal`` in some additional places #159 (@aripddev)
3+
14
## 1.4.0
25
* Simplify API by using ``Number`` instead of ``BigDecimal``, ``int`` and ``double`` for ``Datapoints`` #154 (@aripddev)
36

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We would absolutely love to get the community involved, and we welcome any form
1010
### Ways to help
1111
* **Report bugs**<br/>Create an issue or send a pull request
1212
* **Send pull requests**<br/>If you want to contribute code, check out the development instructions below.
13-
* However when contributing new features, please first discuss the change you wish to make via issue with the owners of this repository before making a change. Otherwise your work might be rejected and your effort was pointless.
13+
* However when contributing larger new features, please first discuss the change you wish to make via issue with the owners of this repository before making it.<br/>Otherwise your work might be rejected and your effort was pointless.
1414

1515
We also encourage you to read the [contribution instructions by GitHub](https://docs.github.com/en/get-started/quickstart/contributing-to-projects).
1616

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how
2525
## Dependencies and Licenses
2626
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/chartjs-java-model/dependencies)
2727

28+
## Acknowledgment
29+
* To all [contributors](https://github.com/xdev-software/chartjs-java-model/graphs/contributors) that helped to improve this library
30+
* Especially to the devs at [PrimeTek/PrimeFaces](https://www.primefaces.org/) that regularly provide feedback and PRs
31+
2832
<sub>Disclaimer: This is not an official ChartJS product and not associated</sub>

chartjs-java-model-demo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
<dependency>
9191
<groupId>com.puppycrawl.tools</groupId>
9292
<artifactId>checkstyle</artifactId>
93-
<version>10.16.0</version>
93+
<version>10.17.0</version>
9494
</dependency>
9595
</dependencies>
9696
<configuration>

chartjs-java-model/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
<dependency>
344344
<groupId>com.puppycrawl.tools</groupId>
345345
<artifactId>checkstyle</artifactId>
346-
<version>10.16.0</version>
346+
<version>10.17.0</version>
347347
</dependency>
348348
</dependencies>
349349
<configuration>

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/DoughnutOptions.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package software.xdev.chartjs.model.options;
1717

18-
import java.math.BigDecimal;
19-
2018
import software.xdev.chartjs.model.options.animation.DoughnutAnimation;
2119
import software.xdev.chartjs.model.options.elements.ArcElements;
2220

@@ -26,72 +24,72 @@ public class DoughnutOptions extends Options<DoughnutOptions, DoughnutAnimation>
2624
/**
2725
* Default {@code 50}
2826
*
29-
* @see #setCutout(BigDecimal cutout)
27+
* @see #setCutout(Number cutout)
3028
*/
31-
protected BigDecimal cutout;
29+
protected Number cutout;
3230

3331
/**
3432
* Rotation in degrees. Default {@code 0}. {@code 0} is at the top.
3533
*
36-
* @see #setRotation(BigDecimal rotation)
34+
* @see #setRotation(Number rotation)
3735
*/
38-
protected BigDecimal rotation;
36+
protected Number rotation;
3937

4038
/**
4139
* Circumference in degrees. Default {@code 360}.
4240
*
43-
* @see #setCircumference(BigDecimal circumference)
41+
* @see #setCircumference(Number circumference)
4442
*/
45-
protected BigDecimal circumference;
43+
protected Number circumference;
4644

4745
protected ArcElements elements;
4846

4947
/**
50-
* @see #setCutout(BigDecimal cutoutPercentage)
48+
* @see #setCutout(Number cutoutPercentage)
5149
*/
52-
public BigDecimal getCutout()
50+
public Number getCutout()
5351
{
5452
return this.cutout;
5553
}
5654

5755
/**
5856
* The pixels as number of the chart that is cut out of the middle.
5957
*/
60-
public DoughnutOptions setCutout(final BigDecimal cutout)
58+
public DoughnutOptions setCutout(final Number cutout)
6159
{
6260
this.cutout = cutout;
6361
return this;
6462
}
6563

6664
/**
67-
* @see #setRotation(BigDecimal rotation)
65+
* @see #setRotation(Number rotation)
6866
*/
69-
public BigDecimal getRotation()
67+
public Number getRotation()
7068
{
7169
return this.rotation;
7270
}
7371

7472
/**
7573
* Starting angle to draw arcs from in degrees
7674
*/
77-
public DoughnutOptions setRotation(final BigDecimal rotation)
75+
public DoughnutOptions setRotation(final Number rotation)
7876
{
7977
this.rotation = rotation;
8078
return this;
8179
}
8280

8381
/**
84-
* @see #setCircumference(BigDecimal circumference)
82+
* @see #setCircumference(Number circumference)
8583
*/
86-
public BigDecimal getCircumference()
84+
public Number getCircumference()
8785
{
8886
return this.circumference;
8987
}
9088

9189
/**
9290
* Sweep to allow arcs to cover in degrees
9391
*/
94-
public DoughnutOptions setCircumference(final BigDecimal circumference)
92+
public DoughnutOptions setCircumference(final Number circumference)
9593
{
9694
this.circumference = circumference;
9795
return this;

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/PieOptions.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package software.xdev.chartjs.model.options;
1717

18-
import java.math.BigDecimal;
19-
2018
import software.xdev.chartjs.model.options.animation.PieAnimation;
2119
import software.xdev.chartjs.model.options.elements.ArcElements;
2220

@@ -27,72 +25,72 @@ public class PieOptions extends Options<PieOptions, PieAnimation>
2725
/**
2826
* Default {@code 50 - for doughnut, 0 - for pie}
2927
*
30-
* @see #setCutoutPercentage(BigDecimal cutoutPercentage)
28+
* @see #setCutoutPercentage(Number cutoutPercentage)
3129
*/
32-
protected BigDecimal cutoutPercentage;
30+
protected Number cutoutPercentage;
3331

3432
/**
3533
* Default {@code -0.5 * Math.PI}
3634
*
37-
* @see #setRotation(BigDecimal rotation)
35+
* @see #setRotation(Number rotation)
3836
*/
39-
protected BigDecimal rotation;
37+
protected Number rotation;
4038

4139
/**
4240
* Default {@code 2 * Math.PI}
4341
*
44-
* @see #setCircumference(BigDecimal circumference)
42+
* @see #setCircumference(Number circumference)
4543
*/
46-
protected BigDecimal circumference;
44+
protected Number circumference;
4745

4846
protected ArcElements elements;
4947

5048
/**
51-
* @see #setCutoutPercentage(BigDecimal cutoutPercentage)
49+
* @see #setCutoutPercentage(Number cutoutPercentage)
5250
*/
53-
public BigDecimal getCutoutPercentage()
51+
public Number getCutoutPercentage()
5452
{
5553
return this.cutoutPercentage;
5654
}
5755

5856
/**
5957
* The percentage of the chart that is cut out of the middle.
6058
*/
61-
public PieOptions setCutoutPercentage(final BigDecimal cutoutPercentage)
59+
public PieOptions setCutoutPercentage(final Number cutoutPercentage)
6260
{
6361
this.cutoutPercentage = cutoutPercentage;
6462
return this;
6563
}
6664

6765
/**
68-
* @see #setRotation(BigDecimal rotation)
66+
* @see #setRotation(Number rotation)
6967
*/
70-
public BigDecimal getRotation()
68+
public Number getRotation()
7169
{
7270
return this.rotation;
7371
}
7472

7573
/**
7674
* Starting angle to draw arcs from
7775
*/
78-
public PieOptions setRotation(final BigDecimal rotation)
76+
public PieOptions setRotation(final Number rotation)
7977
{
8078
this.rotation = rotation;
8179
return this;
8280
}
8381

8482
/**
85-
* @see #setCircumference(BigDecimal circumference)
83+
* @see #setCircumference(Number circumference)
8684
*/
87-
public BigDecimal getCircumference()
85+
public Number getCircumference()
8886
{
8987
return this.circumference;
9088
}
9189

9290
/**
9391
* Sweep to allow arcs to cover
9492
*/
95-
public PieOptions setCircumference(final BigDecimal circumference)
93+
public PieOptions setCircumference(final Number circumference)
9694
{
9795
this.circumference = circumference;
9896
return this;

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/plugins/zoom/limits/ScaleLimits.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package software.xdev.chartjs.model.options.plugins.zoom.limits;
1717

18-
import java.math.BigDecimal;
19-
2018

2119
/**
2220
* <a href="https://www.chartjs.org/chartjs-plugin-zoom/latest/guide/options.html#scale-limits">ChartJS docs</a>
@@ -25,7 +23,7 @@ public class ScaleLimits
2523
{
2624
protected Object min;
2725
protected Object max;
28-
protected BigDecimal minRange;
26+
protected Number minRange;
2927

3028
public Object getMin()
3129
{
@@ -49,12 +47,12 @@ public ScaleLimits setMax(final Object max)
4947
return this;
5048
}
5149

52-
public BigDecimal getMinRange()
50+
public Number getMinRange()
5351
{
5452
return this.minRange;
5553
}
5654

57-
public ScaleLimits setMinRange(final BigDecimal minRange)
55+
public ScaleLimits setMinRange(final Number minRange)
5856
{
5957
this.minRange = minRange;
6058
return this;

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package software.xdev.chartjs.model.options.scales;
1717

18-
import java.math.BigDecimal;
19-
2018
import software.xdev.chartjs.model.color.Color;
2119

2220

@@ -27,7 +25,7 @@ public class AngleLines
2725
{
2826
protected Boolean display;
2927
protected Color color;
30-
protected BigDecimal lineWidth;
28+
protected Number lineWidth;
3129

3230
/**
3331
* @see #setDisplay(Boolean)
@@ -76,9 +74,9 @@ public AngleLines setColor(final Color color)
7674
}
7775

7876
/**
79-
* @see #setLineWidth(BigDecimal)
77+
* @see #setLineWidth(Number)
8078
*/
81-
public BigDecimal getLineWidth()
79+
public Number getLineWidth()
8280
{
8381
return this.lineWidth;
8482
}
@@ -92,7 +90,7 @@ public BigDecimal getLineWidth()
9290
* Default {@code 1}
9391
* </p>
9492
*/
95-
public AngleLines setLineWidth(final BigDecimal lineWidth)
93+
public AngleLines setLineWidth(final Number lineWidth)
9694
{
9795
this.lineWidth = lineWidth;
9896
return this;

0 commit comments

Comments
 (0)