Skip to content

Commit f1ecf1e

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents 75f839e + b13c9af commit f1ecf1e

File tree

169 files changed

+13153
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+13153
-35
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ body:
1414
attributes:
1515
label: "Checklist"
1616
options:
17-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
17+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/chartjs-java-model/releases/latest)"
1818
required: true
19-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
19+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/chartjs-java-model/issues) or [closed](https://github.com/xdev-software/chartjs-java-model/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2020
required: true
2121
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2222
required: true

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/chartjs-java-model/issues) or [closed](https://github.com/xdev-software/chartjs-java-model/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1818
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/chartjs-java-model/issues) or [closed](https://github.com/xdev-software/chartjs-java-model/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true

.github/workflows/check-build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
strategy:
3131
matrix:
32-
java: [17, 21]
32+
java: [11, 17, 21]
3333
distribution: [temurin]
3434

3535
steps:
@@ -43,7 +43,8 @@ jobs:
4343
cache: 'maven'
4444

4545
- name: Build with Maven
46-
run: ./mvnw -B clean package
46+
# Java 17 is required for tests
47+
run: ./mvnw -B clean package ${{ matrix.java >=17 && '-P run-integration-tests' || '-Dmaven.test.skip=true' }}
4748

4849
- name: Check for uncommited changes
4950
run: |
@@ -70,6 +71,14 @@ jobs:
7071
path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar
7172
if-no-files-found: error
7273

74+
- name: Upload screenshots of test failures
75+
if: failure()
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: test-fail-screenshots-${{ matrix.java }}
79+
path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/screenshots
80+
if-no-files-found: ignore
81+
7382
checkstyle:
7483
runs-on: ubuntu-latest
7584
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}

.run/Run Demo.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
33
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="template-placeholder-demo" />
4+
<module name="chartjs-java-model-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>

CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
## 2.2.0
2+
* Improve color handling #238
3+
* Change ``Color`` to ``RGBAColor`` as it only handles RGBA
4+
* Change all occurrences of ``Color`` to ``Object`` so that other color models (e.g. HSLA or Hex) can be applied
5+
* Created ``HSLAColor`` that can be used like ``RGBAColor``
6+
7+
## 2.1.0
8+
* Charts no longer check if they are drawable #198
9+
* ChartJS behavior: If a chart can't be drawn it will render a empty canvas
10+
* Deprecated methods: ``Chart#toJsonNative`` and ``Chart#isDrawable``
11+
* Make ``IndexAxis`` available in all options
12+
13+
## 2.0.2
14+
_Same as version 2.1.0 - Version was not incremented correctly_
15+
16+
## 2.0.1
17+
* Restored ``DisplayFormats`` #186
18+
19+
## 2.0.0
20+
* Scales have been reworked and are now nearly identical to the [types defined in ChartJS](https://github.com/chartjs/Chart.js/blob/v4.4.3/src/types/index.d.ts)
21+
* The use of ``Color`` for various coloring related options is no longer required.
22+
* It's now possible to use e.g. strings
23+
24+
## 1.5.0
25+
* Added ``JsonIgnore`` to certain fields to help prevent infinite loops #174
26+
* Corrected model for ``Title`` and ``Font`` #175
27+
28+
## 1.4.1
29+
* Use ``Number`` instead of ``BigDecimal`` in some additional places #159 (@aripddev)
30+
31+
## 1.4.0
32+
* Simplify API by using ``Number`` instead of ``BigDecimal``, ``int`` and ``double`` for ``Datapoints`` #154 (@aripddev)
33+
34+
## 1.3.1
35+
* Add subtitle option #141 (@aripddev)
36+
* Add ``PointStyle#rectRounded`` #143 (@aripddev)
37+
* Add ``BubbleDataset#pointStyle`` #144 (@aripddev)
38+
* ``reverse`` property should be on the ``Scale`` object #145
39+
* Added all available properties for ``Legend``
40+
41+
## 1.3.0
42+
* Allows creation of mixed charts #128
43+
* New chart class: ``MixedChart``
44+
* Some classes have been renamed
45+
* ``Data`` -> ``HomogeneousData``
46+
* ``AbstractChart`` -> ``HomogeneousChart``
47+
* Slim down test dependencies
48+
49+
## 1.2.0
50+
* Add TimeScale and TimeTicks to allow building linear time charts #90 (@astappiev)
51+
* Add options for the [Zoom plugin](https://www.chartjs.org/chartjs-plugin-zoom/latest/) #117 (@astappiev)
52+
* Updated dependencies
53+
54+
## 1.1.3
55+
* Add ``toJsonNative`` method which doesn't run the ``isDrawable`` check #91
56+
57+
## 1.1.2
58+
* ⚠️ GroupId changed from ``com.xdev-software`` to ``software.xdev``
59+
60+
## 1.1.1
61+
* ``AngleLines#lineWidth`` now uses ``BigDecimal`` #76
62+
* Updated dependencies
63+
64+
## 1.1.0
65+
* Added support for more [data structures](https://www.chartjs.org/docs/4.4.0/general/data-structures.html) inside ``Dataset#data``
66+
* ``Dataset#data`` can now contain ``Object``s
67+
68+
## 1.0.2
69+
* Support Java 11
70+
* Updated dependencies
71+
72+
## 1.0.1
73+
* Added support for [stacked bar chart with groups](https://www.chartjs.org/docs/4.4.0/samples/bar/stacked-groups.html) (@dlemaignent)
74+
75+
## 1.0.0
76+
Initial release
77+
78+
Support for Chart.js v4
79+
80+
Noteworthy changes compared to [Chart.java](https://github.com/mdewilde/chart):
81+
* Changed the package to ``software.xdev.chartjs.model``
82+
* All charts (e.g. ``BarChart``, ``LineChart``, ...) are now inside the ``charts`` package
83+
* Breaking API changes due to compatibility with Chart.js v4; You may checkout the migration guides
84+
* [3.x Migration Guide](https://www.chartjs.org/docs/4.3.0/migration/v3-migration.html)
85+
* [4.x Migration Guide](https://www.chartjs.org/docs/4.3.0/migration/v4-migration.html)
86+
* JSON is no longer pretty printed by default due to performance reasons
87+
* Implemented integration tests
88+
* Requires Java 17

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ You should have the following things installed:
3434
* Ensure that the JDK/Java-Version is correct
3535

3636

37-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/release.yml?branch=master)](https://github.com/xdev-software/template-placeholder/actions/workflows/release.yml)
37+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/chartjs-java-model/release.yml?branch=master)](https://github.com/xdev-software/chartjs-java-model/actions/workflows/release.yml)
3838

3939
Before releasing:
40-
* Consider doing a [test-deployment](https://github.com/xdev-software/template-placeholder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
40+
* Consider doing a [test-deployment](https://github.com/xdev-software/chartjs-java-model/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4141
* Check the [changelog](CHANGELOG.md)
4242

4343
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/template-placeholder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/template-placeholder)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop)
3-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_template-placeholder&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_template-placeholder)
1+
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/chartjs-java-model?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/chartjs-java-model)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/chartjs-java-model/check-build.yml?branch=develop)](https://github.com/xdev-software/chartjs-java-model/actions/workflows/check-build.yml?query=branch%3Adevelop)
3+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_chartjs-java-model&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_chartjs-java-model)
4+
[![ChartJS Documentation](https://img.shields.io/badge/Chart.js-documentation-ff6384?logo=Chart.js)](https://www.chartjs.org/docs/latest/)
45

5-
# template-placeholder
6+
# <img src="https://www.chartjs.org/media/logo.svg" height="38" /> chartjs-java-model
7+
Provides Java models for [Chart.js](https://www.chartjs.org/) so that e.g. a Java Server can build a chart and then instruct a JavaScript client what needs to be shown.
68

9+
This repo extends the abandoned [Chart.java](https://github.com/mdewilde/chart) and adds support for Chart.js Version 4+.
710

811
## Installation
9-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
12+
[Installation guide for the latest release](https://github.com/xdev-software/chartjs-java-model/releases/latest#Installation)
13+
14+
#### Compatibility with Chart.js
15+
| Chart.js | ``chartjs-java-model`` version |
16+
| --- | --- |
17+
| 4.x | ``1+`` |
1018

1119
## Support
1220
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
@@ -15,4 +23,10 @@ If you need support as soon as possible and you can't wait for any pull request,
1523
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
1624

1725
## Dependencies and Licenses
18-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/template-placeholder/dependencies)
26+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/chartjs-java-model/dependencies)
27+
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+
32+
<sub>Disclaimer: This is not an official ChartJS product and not associated</sub>

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/template-placeholder/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/chartjs-java-model/security/advisories/new).

template-placeholder-demo/pom.xml renamed to chartjs-java-model-demo/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
<parent>
88
<groupId>software.xdev</groupId>
9-
<artifactId>template-placeholder-root</artifactId>
10-
<version>1.0.0-SNAPSHOT</version>
9+
<artifactId>chartjs-java-model-root</artifactId>
10+
<version>2.2.1-SNAPSHOT</version>
1111
</parent>
1212

13-
<artifactId>template-placeholder-demo</artifactId>
14-
<version>1.0.0-SNAPSHOT</version>
13+
<artifactId>chartjs-java-model-demo</artifactId>
14+
<version>2.2.1-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<organization>
@@ -20,7 +20,7 @@
2020
</organization>
2121

2222
<properties>
23-
<javaVersion>17</javaVersion>
23+
<javaVersion>11</javaVersion>
2424
<maven.compiler.release>${javaVersion}</maven.compiler.release>
2525

2626
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -32,7 +32,7 @@
3232
<dependencies>
3333
<dependency>
3434
<groupId>software.xdev</groupId>
35-
<artifactId>template-placeholder</artifactId>
35+
<artifactId>chartjs-java-model</artifactId>
3636
<version>${project.version}</version>
3737
</dependency>
3838
</dependencies>

0 commit comments

Comments
 (0)