From b3fd2a70de85b9965da0c0923a5f885486055c0a Mon Sep 17 00:00:00 2001 From: Bethibande Date: Fri, 12 Jul 2024 10:51:13 +0200 Subject: [PATCH] SeriesBuilder missing generics parameter #185 --- .../appreciated/apexcharts/config/builder/SeriesBuilder.java | 4 ++-- .../apexcharts/examples/line/LineChartExample.java | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/appreciated/apexcharts/config/builder/SeriesBuilder.java b/src/main/java/com/github/appreciated/apexcharts/config/builder/SeriesBuilder.java index 7cf4b70..ee2e1b5 100644 --- a/src/main/java/com/github/appreciated/apexcharts/config/builder/SeriesBuilder.java +++ b/src/main/java/com/github/appreciated/apexcharts/config/builder/SeriesBuilder.java @@ -11,8 +11,8 @@ public class SeriesBuilder { private SeriesBuilder() { } - public static SeriesBuilder get() { - return new SeriesBuilder(); + public static SeriesBuilder get() { + return new SeriesBuilder<>(); } public SeriesBuilder withName(String name) { diff --git a/src/test/java/com/github/appreciated/apexcharts/examples/line/LineChartExample.java b/src/test/java/com/github/appreciated/apexcharts/examples/line/LineChartExample.java index 6832ca2..2983264 100644 --- a/src/test/java/com/github/appreciated/apexcharts/examples/line/LineChartExample.java +++ b/src/test/java/com/github/appreciated/apexcharts/examples/line/LineChartExample.java @@ -29,6 +29,9 @@ public LineChartExample() { .withCategories("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep") .withTickPlacement(TickPlacement.BETWEEN) .build()) - .withSeries(new Series<>("Desktops", 10.0, 41.0, 35.0, 51.0, 49.0, 62.0, 69.0, 91.0, 148.0)); + .withSeries(SeriesBuilder.get() + .withName("Desktops") + .withData(10.0, 41.0, 35.0, 51.0, 49.0, 62.0, 69.0, 91.0, 148.0) + .build()); } }