File tree Expand file tree Collapse file tree 19 files changed +237
-60
lines changed
main/java/com/github/koooooo7/echarts4j
test/java/com/github/koooooo7/echarts4j/chart Expand file tree Collapse file tree 19 files changed +237
-60
lines changed Original file line number Diff line number Diff line change 1
1
package com .github .koooooo7 .echarts4j .chart ;
2
2
3
+ import com .fasterxml .jackson .annotation .JsonInclude ;
3
4
import com .github .koooooo7 .echarts4j .option .chart .XAxis ;
4
5
import com .github .koooooo7 .echarts4j .option .chart .YAxis ;
5
6
import lombok .Builder ;
6
7
import lombok .Data ;
7
8
import lombok .EqualsAndHashCode ;
8
9
import lombok .experimental .SuperBuilder ;
9
10
11
+ import java .util .List ;
10
12
import java .util .Objects ;
11
13
12
14
@ Data
@@ -26,4 +28,20 @@ public void postProcessor() {
26
28
getChartOptions ().setYAxis (YAxis .builder ().build ());
27
29
}
28
30
}
31
+
32
+ @ Data
33
+ @ SuperBuilder
34
+ @ JsonInclude (JsonInclude .Include .NON_NULL )
35
+ public static class BarDataItem {
36
+ private String name ;
37
+ private Integer value ;
38
+ private String groupId ;
39
+ private String childGroupId ;
40
+ private String symbol ;
41
+ private Object symbolSize ;
42
+ private Integer symbolRotate ;
43
+ private Boolean symbolKeepAspect ;
44
+ private List <?> symbolOffset ;
45
+
46
+ }
29
47
}
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public enum ChartType {
20
20
Pie ("pie" ),
21
21
Scatter ("scatter" ),
22
22
EffectScatter ("effectScatter" ),
23
- Radar ("radar" );
23
+ Radar ("radar" ),
24
+ Sunburst ("sunburst" );
24
25
private final String type ;
25
26
}
Original file line number Diff line number Diff line change 1
1
package com .github .koooooo7 .echarts4j .chart ;
2
2
3
+ import com .fasterxml .jackson .annotation .JsonInclude ;
3
4
import com .github .koooooo7 .echarts4j .option .chart .XAxis ;
4
5
import com .github .koooooo7 .echarts4j .option .chart .YAxis ;
5
6
import lombok .Builder ;
6
7
import lombok .Data ;
7
8
import lombok .EqualsAndHashCode ;
8
9
import lombok .experimental .SuperBuilder ;
9
10
11
+ import java .util .List ;
10
12
import java .util .Objects ;
11
13
12
14
@ Data
@@ -26,4 +28,20 @@ public void postProcessor() {
26
28
getChartOptions ().setYAxis (YAxis .builder ().build ());
27
29
}
28
30
}
31
+
32
+ @ Data
33
+ @ SuperBuilder
34
+ @ JsonInclude (JsonInclude .Include .NON_NULL )
35
+ public static class LineDataItem {
36
+ private String name ;
37
+ private Integer value ;
38
+ private String groupId ;
39
+ private String childGroupId ;
40
+ private String symbol ;
41
+ private Object symbolSize ;
42
+ private Integer symbolRotate ;
43
+ private Boolean symbolKeepAspect ;
44
+ private List <?> symbolOffset ;
45
+
46
+ }
29
47
}
Original file line number Diff line number Diff line change 1
1
package com .github .koooooo7 .echarts4j .chart ;
2
2
3
+ import com .fasterxml .jackson .annotation .JsonInclude ;
3
4
import lombok .Builder ;
4
5
import lombok .Data ;
5
6
import lombok .EqualsAndHashCode ;
6
7
import lombok .experimental .SuperBuilder ;
7
8
9
+ import java .util .List ;
10
+
8
11
@ Data
9
12
@ SuperBuilder
10
13
@ EqualsAndHashCode (callSuper = true )
11
14
public class RadarChart extends BaseChart <RadarChart > {
12
15
@ Builder .Default
13
16
private ChartType chartType = ChartType .Radar ;
17
+
18
+ @ Data
19
+ @ SuperBuilder
20
+ @ JsonInclude (JsonInclude .Include .NON_NULL )
21
+ public static class RadarDataItem {
22
+ private String name ;
23
+ private Integer value ;
24
+ private String groupId ;
25
+ private String childGroupId ;
26
+ private String symbol ;
27
+ private Object symbolSize ;
28
+ private Integer symbolRotate ;
29
+ private Boolean symbolKeepAspect ;
30
+ private List <?> symbolOffset ;
31
+
32
+ }
14
33
}
Original file line number Diff line number Diff line change
1
+ package com .github .koooooo7 .echarts4j .chart ;
2
+
3
+ import com .github .koooooo7 .echarts4j .option .embedded .Emphasis ;
4
+ import com .github .koooooo7 .echarts4j .option .embedded .ItemStyle ;
5
+ import com .github .koooooo7 .echarts4j .option .embedded .Label ;
6
+ import lombok .Builder ;
7
+ import lombok .Data ;
8
+ import lombok .EqualsAndHashCode ;
9
+ import lombok .experimental .SuperBuilder ;
10
+
11
+ import java .util .List ;
12
+
13
+
14
+ @ Data
15
+ @ SuperBuilder
16
+ @ EqualsAndHashCode (callSuper = true )
17
+ public class SunburstChart extends BaseChart <SunburstChart > {
18
+ @ Builder .Default
19
+ private ChartType chartType = ChartType .Sunburst ;
20
+
21
+ @ Data
22
+ @ Builder
23
+ public static class SunburstDataItem {
24
+ private String name ;
25
+ private Integer value ;
26
+ private Label label ;
27
+ private ItemStyle itemStyle ;
28
+ private Emphasis emphasis ;
29
+ private List <?> children ;
30
+ }
31
+ }
Original file line number Diff line number Diff line change @@ -38,13 +38,17 @@ public class Legend {
38
38
@ Data
39
39
@ JsonInclude (JsonInclude .Include .NON_NULL )
40
40
public static class ItemStyle {
41
+ private FuncStr color ;
41
42
42
43
}
43
44
44
45
@ Builder
45
46
@ Data
46
47
@ JsonInclude (JsonInclude .Include .NON_NULL )
47
48
public static class LineStyle {
49
+ private String color ;
50
+ private Integer width ;
51
+ private FuncStr type ;
48
52
49
53
}
50
54
Original file line number Diff line number Diff line change 8
8
@ Builder
9
9
@ JsonInclude (JsonInclude .Include .NON_NULL )
10
10
public class AreaStyle {
11
+ private String color ;
12
+ private String origin ;
11
13
}
Original file line number Diff line number Diff line change
1
+ package com .github .koooooo7 .echarts4j .option .embedded ;
2
+
3
+ import com .fasterxml .jackson .annotation .JsonInclude ;
4
+ import lombok .Builder ;
5
+ import lombok .Data ;
6
+
7
+ @ Data
8
+ @ Builder
9
+ @ JsonInclude (JsonInclude .Include .NON_NULL )
10
+ public class Emphasis {
11
+ private Label label ;
12
+ private ItemStyle itemStyle ;
13
+ }
Original file line number Diff line number Diff line change 1
1
package com .github .koooooo7 .echarts4j .option .embedded ;
2
2
3
3
import com .fasterxml .jackson .annotation .JsonInclude ;
4
+ import com .github .koooooo7 .echarts4j .type .FuncStr ;
4
5
import lombok .Builder ;
5
6
import lombok .Data ;
6
7
7
8
@ Data
8
9
@ Builder
9
10
@ JsonInclude (JsonInclude .Include .NON_NULL )
10
11
public class ItemStyle {
12
+ private FuncStr color ;
11
13
}
Original file line number Diff line number Diff line change 1
1
package com .github .koooooo7 .echarts4j .option .embedded ;
2
2
3
3
import com .fasterxml .jackson .annotation .JsonInclude ;
4
+ import com .github .koooooo7 .echarts4j .option .chart .Legend ;
5
+ import com .github .koooooo7 .echarts4j .type .FuncStr ;
4
6
import lombok .Builder ;
5
7
import lombok .Data ;
6
8
9
+ import java .util .List ;
10
+
7
11
@ Data
8
12
@ Builder
9
13
@ JsonInclude (JsonInclude .Include .NON_NULL )
10
14
public class Label {
15
+ private Boolean show ;
16
+ private FuncStr position ;
17
+ private Integer distance ;
18
+ private FuncStr rotate ;
19
+ private List <Integer > offset ;
20
+ private Integer minMargin ;
21
+ private FuncStr formatter ;
22
+ private Integer fontSize ;
23
+ private ItemStyle itemStyle ;
24
+ private LineStyle lineStyle ;
25
+
11
26
}
Original file line number Diff line number Diff line change 1
1
package com .github .koooooo7 .echarts4j .option .embedded ;
2
2
3
3
import com .fasterxml .jackson .annotation .JsonInclude ;
4
+ import com .github .koooooo7 .echarts4j .type .FuncStr ;
4
5
import lombok .Builder ;
5
6
import lombok .Data ;
6
7
7
8
@ Data
8
9
@ Builder
9
10
@ JsonInclude (JsonInclude .Include .NON_NULL )
10
11
public class LineStyle {
12
+ private String color ;
13
+ private Integer width ;
14
+ private FuncStr type ;
11
15
}
Original file line number Diff line number Diff line change @@ -13,4 +13,5 @@ public class Tooltip {
13
13
private FuncStr formatter ;
14
14
private FuncStr valueFormatter ;
15
15
private Integer padding ;
16
+ private TextStyle textStyle ;
16
17
}
Original file line number Diff line number Diff line change @@ -28,20 +28,6 @@ public class BarChartSeriesOption extends GenericSeriesOption implements SeriesO
28
28
private String barCategoryGap ;
29
29
30
30
31
- @ Data
32
- @ SuperBuilder
33
- @ JsonInclude (JsonInclude .Include .NON_NULL )
34
- public static class BarDataItem {
35
- private String name ;
36
- private Integer value ;
37
- private String groupId ;
38
- private String childGroupId ;
39
- private String symbol ;
40
- private Object symbolSize ;
41
- private Integer symbolRotate ;
42
- private Boolean symbolKeepAspect ;
43
- private List <?> symbolOffset ;
44
31
45
- }
46
32
47
33
}
Original file line number Diff line number Diff line change 2
2
3
3
import com .fasterxml .jackson .annotation .JsonInclude ;
4
4
import com .github .koooooo7 .echarts4j .chart .ChartType ;
5
+ import com .github .koooooo7 .echarts4j .option .embedded .AreaStyle ;
6
+ import com .github .koooooo7 .echarts4j .option .embedded .Emphasis ;
7
+ import com .github .koooooo7 .echarts4j .option .embedded .ItemStyle ;
8
+ import com .github .koooooo7 .echarts4j .option .embedded .Label ;
9
+ import com .github .koooooo7 .echarts4j .option .embedded .LineStyle ;
5
10
import com .github .koooooo7 .echarts4j .option .embedded .TextStyle ;
6
11
import com .github .koooooo7 .echarts4j .option .embedded .Tooltip ;
7
12
import com .github .koooooo7 .echarts4j .type .FuncStr ;
@@ -37,6 +42,11 @@ public class GenericSeriesOption implements SeriesOption {
37
42
private Boolean connectNulls ;
38
43
private Boolean clip ;
39
44
private Boolean show ;
45
+ private Label label ;
46
+ private ItemStyle itemStyle ;
47
+ private LineStyle lineStyle ;
48
+ private AreaStyle areaStyle ;
49
+ private Emphasis emphasis ;
40
50
private Object data ;
41
51
private Boolean large ;
42
52
private Integer largeThreshold ;
Original file line number Diff line number Diff line change @@ -19,20 +19,6 @@ public class LineChartSeriesOption extends GenericSeriesOption implements Series
19
19
private List <?> data ;
20
20
21
21
22
- @ Data
23
- @ SuperBuilder
24
- @ JsonInclude (JsonInclude .Include .NON_NULL )
25
- public static class LineDataItem {
26
- private String name ;
27
- private Integer value ;
28
- private String groupId ;
29
- private String childGroupId ;
30
- private String symbol ;
31
- private Object symbolSize ;
32
- private Integer symbolRotate ;
33
- private Boolean symbolKeepAspect ;
34
- private List <?> symbolOffset ;
35
22
36
- }
37
23
38
24
}
Original file line number Diff line number Diff line change @@ -30,20 +30,4 @@ public class PieChartSeriesOption extends GenericSeriesOption implements SeriesO
30
30
private List <?> data ;
31
31
private String radius ;
32
32
33
-
34
- @ Data
35
- @ SuperBuilder
36
- @ JsonInclude (JsonInclude .Include .NON_NULL )
37
- public static class BarDataItem {
38
- private String name ;
39
- private Integer value ;
40
- private String groupId ;
41
- private String childGroupId ;
42
- private String symbol ;
43
- private Object symbolSize ;
44
- private Integer symbolRotate ;
45
- private Boolean symbolKeepAspect ;
46
- private List <?> symbolOffset ;
47
- }
48
-
49
33
}
Original file line number Diff line number Diff line change @@ -19,20 +19,5 @@ public class RadarChartSeriesOption extends GenericSeriesOption implements Serie
19
19
private List <?> data ;
20
20
21
21
22
- @ Data
23
- @ SuperBuilder
24
- @ JsonInclude (JsonInclude .Include .NON_NULL )
25
- public static class RadarDataItem {
26
- private String name ;
27
- private Integer value ;
28
- private String groupId ;
29
- private String childGroupId ;
30
- private String symbol ;
31
- private Object symbolSize ;
32
- private Integer symbolRotate ;
33
- private Boolean symbolKeepAspect ;
34
- private List <?> symbolOffset ;
35
-
36
- }
37
22
38
23
}
Original file line number Diff line number Diff line change
1
+ package com .github .koooooo7 .echarts4j .option .series ;
2
+
3
+ import com .fasterxml .jackson .annotation .JsonInclude ;
4
+ import com .github .koooooo7 .echarts4j .chart .ChartType ;
5
+ import com .github .koooooo7 .echarts4j .option .embedded .Emphasis ;
6
+ import com .github .koooooo7 .echarts4j .option .embedded .ItemStyle ;
7
+ import com .github .koooooo7 .echarts4j .option .embedded .Label ;
8
+ import lombok .Builder ;
9
+ import lombok .Data ;
10
+ import lombok .EqualsAndHashCode ;
11
+ import lombok .experimental .SuperBuilder ;
12
+
13
+ import java .util .List ;
14
+
15
+ @ Data
16
+ @ SuperBuilder
17
+ @ JsonInclude (JsonInclude .Include .NON_NULL )
18
+ @ EqualsAndHashCode (callSuper = true )
19
+ public class SunburstChartSeriesOption extends GenericSeriesOption implements SeriesOption {
20
+ @ Builder .Default
21
+ private String type = ChartType .Sunburst .getType ();
22
+ private List <?> data ;
23
+
24
+
25
+ }
You can’t perform that action at this time.
0 commit comments