Skip to content

Commit

Permalink
update: add options embedded
Browse files Browse the repository at this point in the history
  • Loading branch information
Koooooo-7 committed Jul 1, 2024
1 parent 24b9937 commit c97ac0e
Show file tree
Hide file tree
Showing 19 changed files with 165 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.github.koooooo7.echarts4j.option.chart.YAxis;
import com.github.koooooo7.echarts4j.option.series.SeriesOption;
import com.github.koooooo7.echarts4j.option.chart.Title;
import com.github.koooooo7.echarts4j.type.FuncStr;
import lombok.Data;
import lombok.experimental.SuperBuilder;

Expand All @@ -32,6 +33,9 @@ public class ChartOption {
private Toolbox toolbox;
private Object color;
private Boolean animation;
private Integer animationThreshold;
private FuncStr animationDuration;
private FuncStr animationDelay;
private Boolean useUTC;
private final List<SeriesOption> series = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.github.koooooo7.echarts4j.option.chart;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.koooooo7.echarts4j.type.FuncStr;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Polar {
private String id;
@JsonProperty("zlevel")
private Integer zLevel;
private Integer z;
private FuncStr center;
private Object radius;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.github.koooooo7.echarts4j.option.chart;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.koooooo7.echarts4j.option.embedded.NameTextStyle;
import com.github.koooooo7.echarts4j.option.embedded.NameTruncate;
import com.github.koooooo7.echarts4j.type.FuncStr;
import com.github.koooooo7.echarts4j.util.annotation.EmbedScope;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.SuperBuilder;

import java.util.List;

@Data
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RadiusAxis {
private String id;
private Integer polarIndex;
private String type;
private String name;
private String nameLocation;
private List<?> data;
private NameTextStyle nameTextStyle;
private NameTruncate nameTruncate;
private Boolean inverse;
private Object boundaryGap;
private FuncStr min;
private FuncStr max;
private Boolean scale;
private Integer splitNumber;
private Integer minInterval;
private Integer maxInterval;
private Integer interval;
private Integer logBase;
private Boolean silent;
private Boolean triggerEvent;

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.koooooo7.echarts4j.option.series.embed;
package com.github.koooooo7.echarts4j.option.chart;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
Expand All @@ -7,7 +7,7 @@
@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SeriesTextStyle {
public class TextStyle {
private String color;
private String fontStyle;
private String fontWeight;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.koooooo7.echarts4j.option.chart;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.koooooo7.echarts4j.option.embedded.NameTextStyle;
import com.github.koooooo7.echarts4j.option.embedded.NameTruncate;
import com.github.koooooo7.echarts4j.type.FuncStr;
import com.github.koooooo7.echarts4j.util.annotation.EmbedScope;
import lombok.Builder;
Expand Down Expand Up @@ -36,16 +38,4 @@ public class XAxis {
private Boolean silent;
private Boolean triggerEvent;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EmbedScope({XAxis.class, YAxis.class})
public static class NameTextStyle {
}

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class NameTruncate {
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.koooooo7.echarts4j.option.chart;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.koooooo7.echarts4j.option.embedded.NameTextStyle;
import com.github.koooooo7.echarts4j.option.embedded.NameTruncate;
import com.github.koooooo7.echarts4j.type.FuncStr;
import com.github.koooooo7.echarts4j.util.annotation.EmbedScope;
import lombok.Builder;
Expand Down Expand Up @@ -36,16 +38,4 @@ public class YAxis {
private Boolean silent;
private Boolean triggerEvent;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EmbedScope({XAxis.class, YAxis.class})
public static class NameTextStyle {
}

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class NameTruncate {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.github.koooooo7.echarts4j.option.embedded;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AreaStyle {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.github.koooooo7.echarts4j.option.embedded;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ItemStyle {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.github.koooooo7.echarts4j.option.embedded;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Label {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.github.koooooo7.echarts4j.option.embedded;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class LineStyle {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.github.koooooo7.echarts4j.option.embedded;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.koooooo7.echarts4j.option.chart.RadiusAxis;
import com.github.koooooo7.echarts4j.option.chart.XAxis;
import com.github.koooooo7.echarts4j.option.chart.YAxis;
import com.github.koooooo7.echarts4j.util.annotation.EmbedScope;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EmbedScope({XAxis.class, YAxis.class, RadiusAxis.class})
public class NameTextStyle {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.github.koooooo7.echarts4j.option.embedded;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.koooooo7.echarts4j.option.chart.RadiusAxis;
import com.github.koooooo7.echarts4j.option.chart.XAxis;
import com.github.koooooo7.echarts4j.option.chart.YAxis;
import com.github.koooooo7.echarts4j.util.annotation.EmbedScope;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EmbedScope({XAxis.class, YAxis.class, RadiusAxis.class})
public class NameTruncate {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.github.koooooo7.echarts4j.option.embedded;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TextStyle {
private String color;
private String fontStyle;
private String fontWeight;
private Integer fontSize;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.koooooo7.echarts4j.option.series.embed;
package com.github.koooooo7.echarts4j.option.embedded;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.koooooo7.echarts4j.type.FuncStr;
Expand All @@ -8,7 +8,7 @@
@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SeriesTooltip {
public class Tooltip {
private Object position;
private FuncStr formatter;
private FuncStr valueFormatter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.koooooo7.echarts4j.chart.ChartType;
import com.github.koooooo7.echarts4j.option.series.embed.SeriesTextStyle;
import com.github.koooooo7.echarts4j.option.series.embed.SeriesTooltip;
import com.github.koooooo7.echarts4j.option.embedded.TextStyle;
import com.github.koooooo7.echarts4j.option.embedded.Tooltip;
import com.github.koooooo7.echarts4j.type.FuncStr;
import lombok.Builder;
import lombok.Data;
Expand Down Expand Up @@ -56,8 +56,8 @@ public class GenericSeriesOption implements SeriesOption {
private FuncStr animationDurationUpdate;
private String animationEasingUpdate;
private FuncStr animationDelayUpdate;
private SeriesTooltip tooltip;
private SeriesTextStyle textStyle;
private Tooltip tooltip;
private TextStyle textStyle;


}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit c97ac0e

Please sign in to comment.