Skip to content

Release #183

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

Merged
merged 28 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2e84fc1
Merge pull request #178 from xdev-software/master
AB-xdev Jun 5, 2024
3feccd2
Update dependency org.apache.maven.plugins:maven-checkstyle-plugin to…
xdev-renovate Jun 6, 2024
543132b
Merge pull request #66 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Jun 10, 2024
544753b
Fix rev-parse not working
AB-xdev Jun 11, 2024
a042b63
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jun 11, 2024
49f82a1
Fix problem with fetch depth of 0
AB-xdev Jun 11, 2024
e73d714
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jun 11, 2024
1b8b6b2
Fully unshallow every as ls-remote also fails
AB-xdev Jun 11, 2024
de9071b
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jun 11, 2024
538caf1
Revert "Fully unshallow every as ls-remote also fails"
AB-xdev Jun 11, 2024
ca909f1
Revert "Fix problem with fetch depth of 0"
AB-xdev Jun 11, 2024
38e37eb
Revert "Fix rev-parse not working"
AB-xdev Jun 11, 2024
56ef08a
Correct if
AB-xdev Jun 11, 2024
f9d8378
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jun 11, 2024
d8cb83c
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Jun 12, 2024
be0c609
Merge pull request #181 from xdev-software/update-from-template-merged
AB-xdev Jun 12, 2024
3af084d
Rework scales
AB-xdev Jun 13, 2024
8d6e711
Merge branch 'develop' into scale-rework
AB-xdev Jun 13, 2024
2ade407
Provide default implementations for auto detection
AB-xdev Jun 13, 2024
9a9678b
Implement correctly
AB-xdev Jun 13, 2024
ecf56df
Make it possible to set string as color
AB-xdev Jun 13, 2024
aea56e3
Changelog 2.0.0
AB-xdev Jun 13, 2024
501f3b4
Add test for radial scale
AB-xdev Jun 13, 2024
5dea9bd
Update CHANGELOG.md
AB-xdev Jun 13, 2024
f2fca1f
Add missing license headers
AB-xdev Jun 13, 2024
7858c73
Fix incorrect JavaDoc and crash on Java 17
AB-xdev Jun 13, 2024
5659f63
Update CHANGELOG.md
AB-xdev Jun 13, 2024
dfb15d8
Merge pull request #182 from xdev-software/scale-rework
AB-xdev Jun 13, 2024
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
4 changes: 4 additions & 0 deletions .github/workflows/update-from-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ jobs:
echo "Checking if update-branch-merged exists"
git fetch
if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
echo "Branch still exists; Continuing..."
else
echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing"
exit 0
fi
Expand Down Expand Up @@ -274,6 +276,8 @@ jobs:
echo "Fetching..."
git fetch
if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
echo "Branch still exists; Continuing..."
else
echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing"
exit 0
fi
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.0.0
* 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)
* The use of ``Color`` for various coloring related options is no longer required.
* It's now possible to use e.g. strings

## 1.5.0
* Added ``JsonIgnore`` to certain fields to help prevent infinite loops #174
* Corrected model for ``Title`` and ``Font`` #175
Expand Down
4 changes: 2 additions & 2 deletions chartjs-java-model-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>software.xdev</groupId>
<artifactId>chartjs-java-model-demo</artifactId>
<version>1.5.1-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<organization>
Expand Down Expand Up @@ -85,7 +85,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
Expand Down
4 changes: 2 additions & 2 deletions chartjs-java-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>software.xdev</groupId>
<artifactId>chartjs-java-model</artifactId>
<version>1.5.1-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>chartjs-java-model</name>
Expand Down Expand Up @@ -355,7 +355,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.ArrayList;
import java.util.List;

import software.xdev.chartjs.model.color.Color;
import software.xdev.chartjs.model.enums.BorderCapStyle;
import software.xdev.chartjs.model.enums.BorderJoinStyle;
import software.xdev.chartjs.model.enums.PointStyle;
Expand All @@ -34,11 +33,11 @@ public abstract class PointDataset<T extends Dataset<T, O>, O> extends Dataset<T

private Float lineTension;

private Color backgroundColor;
private Object backgroundColor;

private Integer borderWidth;

private Color borderColor;
private Object borderColor;

private BorderCapStyle borderCapStyle;

Expand All @@ -48,9 +47,9 @@ public abstract class PointDataset<T extends Dataset<T, O>, O> extends Dataset<T

private BorderJoinStyle borderJoinStyle;

private final List<Color> pointBorderColor = new OptionalArray<>();
private final List<Object> pointBorderColor = new OptionalArray<>();

private final List<Color> pointBackgroundColor = new OptionalArray<>();
private final List<Object> pointBackgroundColor = new OptionalArray<>();

private final List<Integer> pointBorderWidth = new OptionalArray<>();

Expand All @@ -60,9 +59,9 @@ public abstract class PointDataset<T extends Dataset<T, O>, O> extends Dataset<T

private final List<Integer> pointHitRadius = new OptionalArray<>();

private final List<Color> pointHoverBackgroundColor = new OptionalArray<>();
private final List<Object> pointHoverBackgroundColor = new OptionalArray<>();

private final List<Color> pointHoverBorderColor = new OptionalArray<>();
private final List<Object> pointHoverBorderColor = new OptionalArray<>();

private final List<Integer> pointHoverBorderWidth = new OptionalArray<>();

Expand Down Expand Up @@ -117,17 +116,17 @@ public T setLineTension(final Float lineTension)
}

/**
* @see #setBackgroundColor(Color)
* @see #setBackgroundColor(Object)
*/
public Color getBackgroundColor()
public Object getBackgroundColor()
{
return this.backgroundColor;
}

/**
* The fill color under the line.
*/
public T setBackgroundColor(final Color backgroundColor)
public T setBackgroundColor(final Object backgroundColor)
{
this.backgroundColor = backgroundColor;
return this.self();
Expand All @@ -151,17 +150,17 @@ public T setBorderWidth(final Integer borderWidth)
}

/**
* @see #setBorderColor(Color)
* @see #setBorderColor(Object)
*/
public Color getBorderColor()
public Object getBorderColor()
{
return this.borderColor;
}

/**
* The color of the line.
*/
public T setBorderColor(final Color borderColor)
public T setBorderColor(final Object borderColor)
{
this.borderColor = borderColor;
return this.self();
Expand Down Expand Up @@ -275,15 +274,15 @@ public T setBorderJoinStyle(final BorderJoinStyle borderJoinStyle)
/**
* @see #setPointBorderColor(List)
*/
public List<Color> getPointBorderColor()
public List<Object> getPointBorderColor()
{
return this.pointBorderColor;
}

/**
* @see #setPointBorderColor(List)
*/
public T addPointBorderColor(final Color pointBorderColor)
public T addPointBorderColor(final Object pointBorderColor)
{
this.pointBorderColor.add(pointBorderColor);
return this.self();
Expand All @@ -292,7 +291,7 @@ public T addPointBorderColor(final Color pointBorderColor)
/**
* The border color for points.
*/
public T setPointBorderColor(final List<Color> pointBorderColor)
public T setPointBorderColor(final List<Object> pointBorderColor)
{
this.pointBorderColor.clear();
if(pointBorderColor != null)
Expand All @@ -305,15 +304,15 @@ public T setPointBorderColor(final List<Color> pointBorderColor)
/**
* @see #setPointBackgroundColor(List)
*/
public List<Color> getPointBackgroundColor()
public List<Object> getPointBackgroundColor()
{
return this.pointBackgroundColor;
}

/**
* @see #setPointBackgroundColor(List)
*/
public T addPointBackgroundColor(final Color pointBackgroundColor)
public T addPointBackgroundColor(final Object pointBackgroundColor)
{
this.pointBackgroundColor.add(pointBackgroundColor);
return this.self();
Expand All @@ -322,7 +321,7 @@ public T addPointBackgroundColor(final Color pointBackgroundColor)
/**
* The fill color for points
*/
public T setPointBackgroundColor(final List<Color> pointBackgroundColor)
public T setPointBackgroundColor(final List<Object> pointBackgroundColor)
{
this.pointBackgroundColor.clear();
if(pointBackgroundColor != null)
Expand Down Expand Up @@ -455,15 +454,15 @@ public T setPointHitRadius(final List<Integer> pointHitRadius)
/**
* @see #setPointHoverBackgroundColor(List)
*/
public List<Color> getPointHoverBackgroundColor()
public List<Object> getPointHoverBackgroundColor()
{
return this.pointHoverBackgroundColor;
}

/**
* @see #setPointHoverBackgroundColor(List)
*/
public T addPointHoverBackgroundColor(final Color pointHoverBackgroundColor)
public T addPointHoverBackgroundColor(final Object pointHoverBackgroundColor)
{
this.pointHoverBackgroundColor.add(pointHoverBackgroundColor);
return this.self();
Expand All @@ -472,7 +471,7 @@ public T addPointHoverBackgroundColor(final Color pointHoverBackgroundColor)
/**
* Point background color when hovered
*/
public T setPointHoverBackgroundColor(final List<Color> pointHoverBackgroundColor)
public T setPointHoverBackgroundColor(final List<Object> pointHoverBackgroundColor)
{
this.pointHoverBackgroundColor.clear();
if(pointHoverBackgroundColor != null)
Expand All @@ -485,15 +484,15 @@ public T setPointHoverBackgroundColor(final List<Color> pointHoverBackgroundColo
/**
* @see #setPointHoverBorderColor(List)
*/
public List<Color> getPointHoverBorderColor()
public List<Object> getPointHoverBorderColor()
{
return this.pointHoverBorderColor;
}

/**
* @see #setPointHoverBorderColor(List)
*/
public T addPointHoverBorderColor(final Color pointHoverBorderColor)
public T addPointHoverBorderColor(final Object pointHoverBorderColor)
{
this.pointHoverBorderColor.add(pointHoverBorderColor);
return this.self();
Expand All @@ -502,7 +501,7 @@ public T addPointHoverBorderColor(final Color pointHoverBorderColor)
/**
* Point border color when hovered
*/
public T setPointHoverBorderColor(final List<Color> pointHoverBorderColor)
public T setPointHoverBorderColor(final List<Object> pointHoverBorderColor)
{
this.pointHoverBorderColor.clear();
if(pointHoverBorderColor != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package software.xdev.chartjs.model.options.scales;
package software.xdev.chartjs.model.options;

import software.xdev.chartjs.model.enums.FontStyle;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package software.xdev.chartjs.model.options;

import software.xdev.chartjs.model.color.Color;
import software.xdev.chartjs.model.enums.FontStyle;
import software.xdev.chartjs.model.javascript.JavaScriptFunction;

Expand All @@ -25,7 +24,7 @@ public class LegendLabels
protected Integer boxWidth;
protected Integer fontSize;
protected FontStyle fontStyle;
protected Color fontColor;
protected Object fontColor;
protected String fontFamily;
protected Integer padding;
protected JavaScriptFunction generateLabels;
Expand Down Expand Up @@ -101,9 +100,9 @@ public LegendLabels setFontStyle(final FontStyle fontStyle)
}

/**
* @see #setFontColor(Color)
* @see #setFontColor(Object)
*/
public Color getFontColor()
public Object getFontColor()
{
return this.fontColor;
}
Expand All @@ -117,7 +116,7 @@ public Color getFontColor()
* Default {@code "#666"}
* </p>
*/
public LegendLabels setFontColor(final Color fontColor)
public LegendLabels setFontColor(final Object fontColor)
{
this.fontColor = fontColor;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,21 @@
*/
package software.xdev.chartjs.model.options;

import software.xdev.chartjs.model.color.Color;
import software.xdev.chartjs.model.options.layout.Padding;
import software.xdev.chartjs.model.options.scales.Font;


public class LegendTitle
{
protected Color color;
protected Object color;
protected Boolean display;
protected Font font;
protected Padding padding;
protected String text;

/**
* @see #setColor(Color)
* @see #setColor(Object)
*/
public Color getColor()
public Object getColor()
{
return this.color;
}
Expand All @@ -41,7 +39,7 @@ public Color getColor()
* <p/>
* Color of text
*/
public LegendTitle setColor(final Color color)
public LegendTitle setColor(final Object color)
{
this.color = color;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import software.xdev.chartjs.model.options.animation.Animation;
import software.xdev.chartjs.model.options.animation.Animations;
import software.xdev.chartjs.model.options.layout.Layout;
import software.xdev.chartjs.model.options.scales.Scales;
import software.xdev.chartjs.model.options.scale.Scales;


public class Options<T extends Options<T, A>, A extends Animation<A>>
Expand Down
Loading