From 773b45a366e6d159673d68d03e79e01e3eb0ad3e Mon Sep 17 00:00:00 2001 From: Koy Zhuang Date: Sun, 7 Jul 2024 20:24:57 +0800 Subject: [PATCH] update: refine the chart options individually The chart options sub items should not assume their the same So are the series options, but there is put together as generic for now, TBD --- .../echarts4j/option/chart/AngleAxis.java | 105 +++++++++++++++- .../echarts4j/option/chart/DataZoom.java | 3 - .../echarts4j/option/chart/Radar.java | 4 - .../echarts4j/option/chart/RadiusAxis.java | 118 +++++++++++++++++- .../echarts4j/option/chart/Tooltip.java | 46 ++++++- .../echarts4j/option/chart/XAxis.java | 76 ++++++++++- .../echarts4j/option/chart/YAxis.java | 75 ++++++++++- .../option/embedded/chart/AxisLine.java | 36 ------ .../option/embedded/chart/AxisPointer.java | 51 -------- .../option/embedded/chart/SplitArea.java | 22 ---- .../option/embedded/chart/SplitLine.java | 23 ---- .../option/embedded/series/NameTextStyle.java | 13 -- .../option/embedded/series/NameTruncate.java | 13 -- .../chart/CandlestickChartTests.java | 14 +-- 14 files changed, 404 insertions(+), 195 deletions(-) delete mode 100644 echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/AxisLine.java delete mode 100644 echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/AxisPointer.java delete mode 100644 echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/SplitArea.java delete mode 100644 echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/SplitLine.java delete mode 100644 echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/series/NameTextStyle.java delete mode 100644 echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/series/NameTruncate.java diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/AngleAxis.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/AngleAxis.java index ea5a5fb..cb64640 100644 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/AngleAxis.java +++ b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/AngleAxis.java @@ -1,11 +1,9 @@ package com.github.koooooo7.echarts4j.option.chart; import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.option.embedded.chart.AxisLine; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitArea; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitLine; -import com.github.koooooo7.echarts4j.option.embedded.series.AxisPointer; +import com.github.koooooo7.echarts4j.option.embedded.series.ItemStyle; import com.github.koooooo7.echarts4j.type.FuncStr; +import lombok.Builder; import lombok.Data; import lombok.experimental.SuperBuilder; @@ -38,4 +36,103 @@ public class AngleAxis { private SplitArea splitArea; private AxisPointer axisPointer; + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AxisLine { + private Boolean show; + private Boolean onZero; + private Integer onZeroAxisIndex; + private String symbol; + private FuncStr symbolSize; + private FuncStr symbolOffset; + private LineStyle lineStyle; + + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SplitLine { + private Boolean show; + private String interval; + private LineStyle lineStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SplitArea { + private Boolean show; + private String interval; + private AreaStyle areaStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AreaStyle { + private String[] color; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AxisPointer { + private String type; + private String axis; + private Boolean snap; + private Integer z; + private Label label; + private LineStyle lineStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class Label { + private Boolean show; + private FuncStr position; + private Integer distance; + private FuncStr rotate; + private List offset; + private Integer minMargin; + private FuncStr formatter; + private Integer fontSize; + private ItemStyle itemStyle; + private LineStyle lineStyle; + + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + + + } + + + } diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/DataZoom.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/DataZoom.java index 260a953..f637845 100644 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/DataZoom.java +++ b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/DataZoom.java @@ -5,9 +5,6 @@ import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.experimental.SuperBuilder; - -import java.util.List; public class DataZoom { diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/Radar.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/Radar.java index 8011887..a6f2fbe 100644 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/Radar.java +++ b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/Radar.java @@ -2,10 +2,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.github.koooooo7.echarts4j.option.embedded.chart.AxisLine; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitArea; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitLine; -import com.github.koooooo7.echarts4j.option.embedded.series.AxisPointer; import com.github.koooooo7.echarts4j.type.FuncStr; import lombok.Builder; import lombok.Data; diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/RadiusAxis.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/RadiusAxis.java index 8aea590..679fcf6 100644 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/RadiusAxis.java +++ b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/RadiusAxis.java @@ -1,13 +1,9 @@ package com.github.koooooo7.echarts4j.option.chart; import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.option.embedded.chart.AxisLine; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitArea; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitLine; -import com.github.koooooo7.echarts4j.option.embedded.series.AxisPointer; -import com.github.koooooo7.echarts4j.option.embedded.series.NameTextStyle; -import com.github.koooooo7.echarts4j.option.embedded.series.NameTruncate; +import com.github.koooooo7.echarts4j.option.embedded.series.ItemStyle; import com.github.koooooo7.echarts4j.type.FuncStr; +import lombok.Builder; import lombok.Data; import lombok.experimental.SuperBuilder; @@ -41,4 +37,114 @@ public class RadiusAxis { private SplitLine splitLine; private SplitArea splitArea; private AxisPointer axisPointer; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class NameTextStyle { + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class NameTruncate { + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AxisLine { + private Boolean show; + private Boolean onZero; + private Integer onZeroAxisIndex; + private String symbol; + private FuncStr symbolSize; + private FuncStr symbolOffset; + private AngleAxis.AxisLine.LineStyle lineStyle; + + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SplitLine { + private Boolean show; + private String interval; + private AngleAxis.SplitLine.LineStyle lineStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SplitArea { + private Boolean show; + private String interval; + private AngleAxis.SplitArea.AreaStyle areaStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AreaStyle { + private String[] color; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AxisPointer { + private String type; + private String axis; + private Boolean snap; + private Integer z; + private Label label; + private LineStyle lineStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class Label { + private Boolean show; + private FuncStr position; + private Integer distance; + private FuncStr rotate; + private List offset; + private Integer minMargin; + private FuncStr formatter; + private Integer fontSize; + private ItemStyle itemStyle; + private LineStyle lineStyle; + + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + + } + + } diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/Tooltip.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/Tooltip.java index 4e9de1a..24f3f81 100644 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/Tooltip.java +++ b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/Tooltip.java @@ -1,11 +1,14 @@ package com.github.koooooo7.echarts4j.option.chart; import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.option.embedded.chart.AxisPointer; +import com.github.koooooo7.echarts4j.option.embedded.series.ItemStyle; import com.github.koooooo7.echarts4j.type.FuncStr; +import com.github.koooooo7.echarts4j.util.annotation.EmbedScope; import lombok.Builder; import lombok.Data; +import java.util.List; + @Data @Builder @JsonInclude(JsonInclude.Include.NON_NULL) @@ -25,4 +28,45 @@ public class Tooltip { private Integer padding; private AxisPointer axisPointer; + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + @EmbedScope(EmbedScope.Scope.Chart) + public static class AxisPointer { + private String type; + private String axis; + private Boolean snap; + private Integer z; + private Label label; + private LineStyle lineStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class Label { + private Boolean show; + private FuncStr position; + private Integer distance; + private FuncStr rotate; + private List offset; + private Integer minMargin; + private FuncStr formatter; + private Integer fontSize; + private ItemStyle itemStyle; + private LineStyle lineStyle; + + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + + + } + } diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/XAxis.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/XAxis.java index fc8dbef..b3c628e 100644 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/XAxis.java +++ b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/XAxis.java @@ -1,12 +1,8 @@ package com.github.koooooo7.echarts4j.option.chart; import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.option.embedded.chart.AxisLine; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitArea; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitLine; -import com.github.koooooo7.echarts4j.option.embedded.series.NameTextStyle; -import com.github.koooooo7.echarts4j.option.embedded.series.NameTruncate; import com.github.koooooo7.echarts4j.type.FuncStr; +import lombok.Builder; import lombok.Data; import lombok.experimental.SuperBuilder; @@ -43,4 +39,74 @@ public class XAxis { private SplitLine splitLine; private SplitArea splitArea; + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class NameTextStyle { + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class NameTruncate { + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AxisLine { + private Boolean show; + private Boolean onZero; + private Integer onZeroAxisIndex; + private String symbol; + private FuncStr symbolSize; + private FuncStr symbolOffset; + private LineStyle lineStyle; + + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SplitLine { + private Boolean show; + private String interval; + private LineStyle lineStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SplitArea { + private Boolean show; + private String interval; + private AreaStyle areaStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AreaStyle { + private String[] color; + } + } + + } diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/YAxis.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/YAxis.java index 8c0ce6e..9b12ea8 100644 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/YAxis.java +++ b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/chart/YAxis.java @@ -1,12 +1,8 @@ package com.github.koooooo7.echarts4j.option.chart; import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.option.embedded.chart.AxisLine; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitArea; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitLine; -import com.github.koooooo7.echarts4j.option.embedded.series.NameTextStyle; -import com.github.koooooo7.echarts4j.option.embedded.series.NameTruncate; import com.github.koooooo7.echarts4j.type.FuncStr; +import lombok.Builder; import lombok.Data; import lombok.experimental.SuperBuilder; @@ -43,4 +39,73 @@ public class YAxis { private SplitArea splitArea; + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class NameTextStyle { + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class NameTruncate { + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AxisLine { + private Boolean show; + private Boolean onZero; + private Integer onZeroAxisIndex; + private String symbol; + private FuncStr symbolSize; + private FuncStr symbolOffset; + private LineStyle lineStyle; + + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SplitLine { + private Boolean show; + private String interval; + private LineStyle lineStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class LineStyle { + private String color; + private Integer width; + private FuncStr type; + } + } + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class SplitArea { + private Boolean show; + private String interval; + private AreaStyle areaStyle; + + @Data + @Builder + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class AreaStyle { + private String[] color; + } + } + } diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/AxisLine.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/AxisLine.java deleted file mode 100644 index a9db112..0000000 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/AxisLine.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.github.koooooo7.echarts4j.option.embedded.chart; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.option.embedded.series.ItemStyle; -import com.github.koooooo7.echarts4j.type.FuncStr; -import com.github.koooooo7.echarts4j.util.annotation.EmbedScope; -import lombok.Builder; -import lombok.Data; - -import java.util.List; - -@Data -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@EmbedScope(EmbedScope.Scope.Chart) -public class AxisLine { - private Boolean show; - private Boolean onZero; - private Integer onZeroAxisIndex; - private String symbol; - private FuncStr symbolSize; - private FuncStr symbolOffset; - private LineStyle lineStyle; - - - @Data - @Builder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class LineStyle { - private String color; - private Integer width; - private FuncStr type; - } - - -} diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/AxisPointer.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/AxisPointer.java deleted file mode 100644 index 6be6227..0000000 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/AxisPointer.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.github.koooooo7.echarts4j.option.embedded.chart; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.option.embedded.series.ItemStyle; -import com.github.koooooo7.echarts4j.type.FuncStr; -import com.github.koooooo7.echarts4j.util.annotation.EmbedScope; -import lombok.Builder; -import lombok.Data; - -import java.util.List; - -@Data -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@EmbedScope(EmbedScope.Scope.Chart) -public class AxisPointer { - private String type; - private String axis; - private Boolean snap; - private Integer z; - private Label label; - private LineStyle lineStyle; - - @Data - @Builder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class Label { - private Boolean show; - private FuncStr position; - private Integer distance; - private FuncStr rotate; - private List offset; - private Integer minMargin; - private FuncStr formatter; - private Integer fontSize; - private ItemStyle itemStyle; - private LineStyle lineStyle; - - } - - @Data - @Builder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class LineStyle { - private String color; - private Integer width; - private FuncStr type; - } - - -} diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/SplitArea.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/SplitArea.java deleted file mode 100644 index 6d3fc5c..0000000 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/SplitArea.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.github.koooooo7.echarts4j.option.embedded.chart; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.type.FuncStr; -import lombok.Builder; -import lombok.Data; - -@Data -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -public class SplitArea { - private Boolean show; - private String interval; - private AreaStyle areaStyle; - - @Data - @Builder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class AreaStyle { - private String[] color; - } -} diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/SplitLine.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/SplitLine.java deleted file mode 100644 index 7f87a32..0000000 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/chart/SplitLine.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.github.koooooo7.echarts4j.option.embedded.chart; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.type.FuncStr; -import lombok.Builder; -import lombok.Data; -@Data -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -public class SplitLine { - private Boolean show; - private String interval; - private LineStyle lineStyle; - - @Data - @Builder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class LineStyle { - private String color; - private Integer width; - private FuncStr type; - } -} diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/series/NameTextStyle.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/series/NameTextStyle.java deleted file mode 100644 index fa95f89..0000000 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/series/NameTextStyle.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.koooooo7.echarts4j.option.embedded.series; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.util.annotation.EmbedScope; -import lombok.Builder; -import lombok.Data; - -@Data -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@EmbedScope(EmbedScope.Scope.Series) -public class NameTextStyle { -} diff --git a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/series/NameTruncate.java b/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/series/NameTruncate.java deleted file mode 100644 index 936ba34..0000000 --- a/echarts4j-project/src/main/java/com/github/koooooo7/echarts4j/option/embedded/series/NameTruncate.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.github.koooooo7.echarts4j.option.embedded.series; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.github.koooooo7.echarts4j.util.annotation.EmbedScope; -import lombok.Builder; -import lombok.Data; - -@Data -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@EmbedScope(EmbedScope.Scope.Series) -public class NameTruncate { -} \ No newline at end of file diff --git a/echarts4j-project/src/test/java/com/github/koooooo7/echarts4j/chart/CandlestickChartTests.java b/echarts4j-project/src/test/java/com/github/koooooo7/echarts4j/chart/CandlestickChartTests.java index 2bfed82..d79a422 100644 --- a/echarts4j-project/src/test/java/com/github/koooooo7/echarts4j/chart/CandlestickChartTests.java +++ b/echarts4j-project/src/test/java/com/github/koooooo7/echarts4j/chart/CandlestickChartTests.java @@ -8,10 +8,6 @@ import com.github.koooooo7.echarts4j.option.chart.Tooltip; import com.github.koooooo7.echarts4j.option.chart.XAxis; import com.github.koooooo7.echarts4j.option.chart.YAxis; -import com.github.koooooo7.echarts4j.option.embedded.chart.AxisLine; -import com.github.koooooo7.echarts4j.option.embedded.chart.AxisPointer; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitArea; -import com.github.koooooo7.echarts4j.option.embedded.chart.SplitLine; import com.github.koooooo7.echarts4j.option.embedded.series.ItemStyle; import com.github.koooooo7.echarts4j.option.series.CandlestickChartSeries; import com.github.koooooo7.echarts4j.type.FuncStr; @@ -46,7 +42,7 @@ void shouldRenderCorrectly_WhenRenderTheCandlestickChart_GivenRelatedConfigs() { specific.add(i); } // specific item - CandlestickChart.CandlestickChartDataItem value = CandlestickChart.CandlestickChartDataItem.builder() + CandlestickChart.CandlestickChartDataItem value = CandlestickChart.CandlestickChartDataItem.builder() .itemStyle(ItemStyle.builder() .color(FuncStr.of("'rgba(47, 57, 166, 1)'")) .build()) @@ -59,7 +55,7 @@ void shouldRenderCorrectly_WhenRenderTheCandlestickChart_GivenRelatedConfigs() { .title(Title.builder().text("CandlestickChart Sample").build()) .tooltip(Tooltip.builder() .trigger("axis") - .axisPointer(AxisPointer.builder() + .axisPointer(Tooltip.AxisPointer.builder() .type("cross").build()) .build() ) @@ -76,10 +72,10 @@ void shouldRenderCorrectly_WhenRenderTheCandlestickChart_GivenRelatedConfigs() { .data(Arrays.asList("2013/1/24", "2013/1/25", "2013/1/28", "2013/1/29", "2013/1/30", "2013/1/31", "2013/2/1", "2013/2/4", "2013/2/5", "2013/2/6", "2013/2/7", "2013/2/8", "2013/2/18", "2013/2/19", "2013/2/20", "2013/2/21", "2013/2/22", "2013/2/25", "2013/2/26", "2013/2/27", "2013/2/28", "2013/3/1", "2013/3/4", "2013/3/5", "2013/3/6", "2013/3/7", "2013/3/8", "2013/3/11", "2013/3/12", "2013/3/13", "2013/3/14", "2013/3/15", "2013/3/18", "2013/3/19", "2013/3/20", "2013/3/21", "2013/3/22", "2013/3/25", "2013/3/26", "2013/3/27", "2013/3/28", "2013/3/29", "2013/4/1", "2013/4/2", "2013/4/3", "2013/4/8", "2013/4/9", "2013/4/10", "2013/4/11", "2013/4/12", "2013/4/15", "2013/4/16", "2013/4/17", "2013/4/18", "2013/4/19", "2013/4/22", "2013/4/23", "2013/4/24", "2013/4/25", "2013/4/26", "2013/5/2", "2013/5/3", "2013/5/6", "2013/5/7", "2013/5/8", "2013/5/9", "2013/5/10", "2013/5/13", "2013/5/14", "2013/5/15", "2013/5/16", "2013/5/17", "2013/5/20", "2013/5/21", "2013/5/22", "2013/5/23", "2013/5/24", "2013/5/27", "2013/5/28", "2013/5/29", "2013/5/30", "2013/5/31", "2013/6/3", "2013/6/4", "2013/6/5", "2013/6/6", "2013/6/7", "2013/6/13")) .scale(true) .boundaryGap(FuncStr.of(true)) - .axisLine(AxisLine.builder() + .axisLine(XAxis.AxisLine.builder() .onZero(false) .build()) - .splitLine(SplitLine.builder() + .splitLine(XAxis.SplitLine.builder() .show(false) .build()) .splitNumber(20) @@ -88,7 +84,7 @@ void shouldRenderCorrectly_WhenRenderTheCandlestickChart_GivenRelatedConfigs() { .build()) .yAxis(YAxis.builder() .scale(true) - .splitArea(SplitArea.builder() + .splitArea(YAxis.SplitArea.builder() .show(true) .build()) .build())