1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.chart.plot; |
21 |
|
|
22 |
|
import org.xwiki.chart.dataset.DatasetType; |
23 |
|
import org.xwiki.chart.axis.AxisType; |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
@version |
29 |
|
@since |
30 |
|
|
|
|
| 94.1% |
Uncovered Elements: 1 (17) |
Complexity: 6 |
Complexity Density: 0.6 |
|
31 |
|
public enum PlotType |
32 |
|
{ |
33 |
|
|
34 |
|
LINE("line", DatasetType.CATEGORY, AxisType.CATEGORY, AxisType.NUMBER), |
35 |
|
|
36 |
|
AREA("area", DatasetType.CATEGORY, AxisType.CATEGORY, AxisType.NUMBER), |
37 |
|
|
38 |
|
BAR("bar", DatasetType.CATEGORY, AxisType.CATEGORY, AxisType.NUMBER), |
39 |
|
|
40 |
|
STACKEDBAR("stackedbar", DatasetType.CATEGORY, AxisType.CATEGORY, AxisType.NUMBER), |
41 |
|
|
42 |
|
PIE("pie", DatasetType.PIE), |
43 |
|
|
44 |
|
BAR3D("bar3D", DatasetType.CATEGORY, AxisType.CATEGORY, AxisType.NUMBER), |
45 |
|
|
46 |
|
STACKEDBAR3D("stackedbar3D", DatasetType.CATEGORY, AxisType.CATEGORY, AxisType.NUMBER), |
47 |
|
|
48 |
|
LINE3D("line3D", DatasetType.CATEGORY, AxisType.CATEGORY, AxisType.NUMBER), |
49 |
|
|
50 |
|
XYAREA("xy_area", DatasetType.XY, AxisType.NUMBER, AxisType.NUMBER), |
51 |
|
|
52 |
|
XYLINEANDSHAPE("xy_line_and_shape", DatasetType.XY, AxisType.NUMBER, AxisType.NUMBER), |
53 |
|
|
54 |
|
XYLINE3D("xy_line3D", DatasetType.XY, AxisType.NUMBER, AxisType.NUMBER), |
55 |
|
|
56 |
|
XYSTEP("xy_step", DatasetType.XY, AxisType.NUMBER, AxisType.NUMBER); |
57 |
|
|
58 |
|
|
59 |
|
private final String name; |
60 |
|
|
61 |
|
|
62 |
|
private final DatasetType defaultDatasetType; |
63 |
|
|
64 |
|
|
65 |
|
private final AxisType [] defaultAxisTypes; |
66 |
|
|
67 |
|
|
68 |
|
@param |
69 |
|
@param |
70 |
|
@param |
71 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
72 |
24 |
PlotType(String name, DatasetType defaultDatasetType, AxisType... defaultAxisTypes)... |
73 |
|
{ |
74 |
24 |
this.name = name; |
75 |
24 |
this.defaultDatasetType = defaultDatasetType; |
76 |
24 |
this.defaultAxisTypes = defaultAxisTypes; |
77 |
|
} |
78 |
|
|
79 |
|
@return |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
80 |
107 |
public String getName()... |
81 |
|
{ |
82 |
107 |
return name; |
83 |
|
} |
84 |
|
|
85 |
|
@return |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
86 |
16 |
public DatasetType getDefaultDatasetType()... |
87 |
|
{ |
88 |
16 |
return defaultDatasetType; |
89 |
|
} |
90 |
|
|
91 |
|
|
92 |
|
@param |
93 |
|
@return |
94 |
|
|
|
|
| 83.3% |
Uncovered Elements: 1 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
95 |
21 |
public static PlotType forName(String name)... |
96 |
|
{ |
97 |
21 |
for (PlotType plotType : values()) |
98 |
|
{ |
99 |
107 |
if (name.equals(plotType.getName())) { |
100 |
21 |
return plotType; |
101 |
|
} |
102 |
|
} |
103 |
|
|
104 |
0 |
return null; |
105 |
|
} |
106 |
|
|
107 |
|
|
108 |
|
@return |
109 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
110 |
21 |
public AxisType [] getDefaultAxisTypes()... |
111 |
|
{ |
112 |
21 |
return defaultAxisTypes; |
113 |
|
} |
114 |
|
|
115 |
|
} |