Debian Codegraph @

opts/radar.go

raw symbols SCIP
1 package opts
2
3 import "github.com/go-echarts/go-echarts/v2/types"
4
5 // RadarComponent is the option set for a radar component.
6 // https://echarts.apache.org/en/option.html#radar
7 type RadarComponent struct {
8 // Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart.
9 Indicator []*Indicator `json:"indicator,omitempty"`
10
11 // Radar render type, in which 'polygon' and 'circle' are supported.
12 Shape string `json:"shape,omitempty"`
13
14 // Segments of indicator axis.
15 // default 5
16 SplitNumber int `json:"splitNumber,omitempty"`
17
18 // Center position of , the first of which is the horizontal position, and the second is the vertical position.
19 // Percentage is supported. When set in percentage, the item is relative to the container width and height.
20 Center interface{} `json:"center,omitempty"`
21
22 // Split area of axis in grid area.
23 SplitArea *SplitArea `json:"splitArea,omitempty"`
24
25 // Split line of axis in grid area.
26 SplitLine *SplitLine `json:"splitLine,omitempty"`
27
28 // AxisLine controls settings related to axis line.
29 AxisLine *AxisLine `json:"axisLine,omitempty"`
30
31 // The start angle of coordinate, which is the angle of the first indicator axis.
32 StartAngle float64 `json:"startAngle,omitempty"`
33
34 // Name options for radar indicators.
35 AxisName *AxisName `json:"axisName,omitempty"`
36 }
37
38 // Indicator is the option set for a radar chart.
39 type Indicator struct {
40 // Indicator name
41 Name string `json:"name,omitempty"`
42
43 // The maximum value of indicator. It is an optional configuration, but we recommend to set it manually.
44 Max float32 `json:"max,omitempty"`
45
46 // The minimum value of indicator. It is an optional configuration, with default value of 0.
47 Min float32 `json:"min,omitempty"`
48
49 // Specify a color the indicator.
50 Color string `json:"color,omitempty"`
51 }
52
53 // Name options for radar indicators.
54 type AxisName struct {
55 // Whether to display the indicator's name.
56 Show types.Bool `json:"show,omitempty"`
57
58 // The formatter of indicator's name, using string template, the template variable should be the indicator's name {value}
59 Formatter types.FuncStr `json:"formatter,omitempty"`
60
61 // Font color
62 Color string `json:"color,omitempty"`
63
64 // Font style
65 // Options: 'normal', 'italic', 'oblique'
66 FontStyle string `json:"fontStyle,omitempty"`
67
68 // FontWeight main title font thick weight.
69 // Options are:
70 // 'normal'
71 // 'bold'
72 // 'bolder'
73 // 'lighter'
74 // 100 | 200 | 300 | 400...
75 FontWeight string `json:"fontWeight,omitempty"`
76
77 // Font family the main title font family.
78 // Options: "sans-serif", 'serif' , 'monospace', 'Arial', 'Courier New', 'Microsoft YaHei', ...
79 FontFamily string `json:"fontFamily,omitempty"`
80
81 // Font size
82 FontSize int `json:"fontSize,omitempty"`
83
84 // Width of text block.
85 Width int `json:"width,omitempty"`
86
87 // Height of text block.
88 Height int `json:"height,omitempty"`
89
90 // Line height of the text fragment.
91 LineHeight int `json:"lineHeight,omitempty"`
92
93 // Text border color.
94 TextBorderColor string `json:"textBorderColor,omitempty"`
95
96 // Text border width.
97 TextBorderWidth int `json:"textBorderWidth,omitempty"`
98
99 // Text border type
100 // Options: 'solid', 'dashed', 'dotted'
101 TextBorderType string `json:"textBorderType,omitempty"`
102
103 // Text border dash offset.
104 TextBorderDashOffset int `json:"textBorderDashOffset,omitempty"`
105
106 // Text shadow color.
107 TextShadowColor string `json:"textShadowColor,omitempty"`
108
109 // Text shadow blur.
110 TextShadowBlur int `json:"textShadowBlur,omitempty"`
111
112 // Text shadow X offset.
113 TextShadowOffsetX int `json:"textShadowOffsetX,omitempty"`
114
115 // Text shadow Y offset.
116 TextShadowOffsetY int `json:"textShadowOffsetY,omitempty"`
117
118 // Determine how to display the text when it's overflow. Available when width is set.
119 //
120 // 'truncate' Truncate the text and trailing with ellipsis.
121 // 'break' Break by word
122 // 'breakAll' Break by character.
123 Overflow string `json:"overflow,omitempty"`
124
125 // Ellipsis
126 Ellipsis types.Bool `json:"ellipsis,omitempty"`
127
128 // Background color of label, which is transparent by default.
129 BackgroundColor string `json:"backgroundColor,omitempty"`
130
131 // Border color of label.
132 BorderColor string `json:"borderColor,omitempty"`
133
134 // Border width of label.
135 BorderWidth int `json:"borderWidth,omitempty"`
136
137 // Border radius of label.
138 BorderRadius int `json:"borderRadius,omitempty"`
139
140 // Border type of label.
141 // Options: 'solid', 'dashed', 'dotted'
142 BorderType string `json:"borderType,omitempty"`
143
144 // Border dash offset of label.
145 BorderDashOffset int `json:"borderDashOffset,omitempty"`
146
147 // Shadow blur of text block.
148 ShadowBlur int `json:"shadowBlur,omitempty"`
149
150 // Shadow color of text block.
151 ShadowColor string `json:"shadowColor,omitempty"`
152
153 // Shadow X offset of text block.
154 ShadowOffsetX int `json:"shadowOffsetX,omitempty"`
155
156 // Shadow Y offset of text block.
157 ShadowOffsetY int `json:"shadowOffsetY,omitempty"`
158
159 // Padding title space around content. See legend.textStyle.padding
160 // The unit is px. Default values for each position are 5.
161 // And they can be set to different values with left, right, top, and bottom.
162 Padding interface{} `json:"padding,omitempty"`
163 }