Debian Codegraph @

opts/text_style.go

raw symbols SCIP
1 package opts
2
3 import "github.com/go-echarts/go-echarts/v2/types"
4
5 // TextStyle is the option set for a text style component.
6 type TextStyle struct {
7 // Font color
8 Color string `json:"color,omitempty"`
9
10 // Font style
11 // Options: 'normal', 'italic', 'oblique'
12 FontStyle string `json:"fontStyle,omitempty"`
13
14 // FontWeight main title font thick weight.
15 // Options are:
16 // 'normal'
17 // 'bold'
18 // 'bolder'
19 // 'lighter'
20 // 100 | 200 | 300 | 400...
21 FontWeight string `json:"fontWeight,omitempty"`
22
23 // Font family the main title font family.
24 // Options: "sans-serif", 'serif' , 'monospace', 'Arial', 'Courier New', 'Microsoft YaHei', ...
25 FontFamily string `json:"fontFamily,omitempty"`
26
27 // Font size
28 FontSize int `json:"fontSize,omitempty"`
29
30 // Width of text block.
31 Width int `json:"width,omitempty"`
32
33 // Height of text block.
34 Height int `json:"height,omitempty"`
35
36 // Horizontal alignment of text, automatic by default.
37 // Options: 'left', 'center', 'right'
38 Align string `json:"align,omitempty"`
39
40 // Vertical alignment of text, automatic by default.
41 // Options: 'top', 'middle', 'bottom'
42 VerticalAlign string `json:"verticalAlign,omitempty"`
43
44 // Line height of the text fragment.
45 LineHeight int `json:"lineHeight,omitempty"`
46
47 // Text border color.
48 TextBorderColor string `json:"textBorderColor,omitempty"`
49
50 // Text border width.
51 TextBorderWidth int `json:"textBorderWidth,omitempty"`
52
53 // Text border type
54 // Options: 'solid', 'dashed', 'dotted'
55 TextBorderType string `json:"textBorderType,omitempty"`
56
57 // Text border dash offset.
58 TextBorderDashOffset int `json:"textBorderDashOffset,omitempty"`
59
60 // Text shadow color.
61 TextShadowColor string `json:"textShadowColor,omitempty"`
62
63 // Text shadow blur.
64 TextShadowBlur int `json:"textShadowBlur,omitempty"`
65
66 // Text shadow X offset.
67 TextShadowOffsetX int `json:"textShadowOffsetX,omitempty"`
68
69 // Text shadow Y offset.
70 TextShadowOffsetY int `json:"textShadowOffsetY,omitempty"`
71
72 // Determine how to display the text when it's overflow. Available when width is set.
73 //
74 // 'truncate' Truncate the text and trailing with ellipsis.
75 // 'break' Break by word
76 // 'breakAll' Break by character.
77 Overflow string `json:"overflow,omitempty"`
78
79 // Ellipsis
80 Ellipsis types.Bool `json:"ellipsis,omitempty"`
81
82 // Background color of label, which is transparent by default.
83 BackgroundColor string `json:"backgroundColor,omitempty"`
84
85 // Border color of label.
86 BorderColor string `json:"borderColor,omitempty"`
87
88 // Border width of label.
89 BorderWidth int `json:"borderWidth,omitempty"`
90
91 // Border radius of label.
92 BorderRadius int `json:"borderRadius,omitempty"`
93
94 // Border type of label.
95 // Options: 'solid', 'dashed', 'dotted'
96 BorderType string `json:"borderType,omitempty"`
97
98 // Border dash offset of label.
99 BorderDashOffset int `json:"borderDashOffset,omitempty"`
100
101 // Shadow blur of text block.
102 ShadowBlur int `json:"shadowBlur,omitempty"`
103
104 // Shadow color of text block.
105 ShadowColor string `json:"shadowColor,omitempty"`
106
107 // Shadow X offset of text block.
108 ShadowOffsetX int `json:"shadowOffsetX,omitempty"`
109
110 // Shadow Y offset of text block.
111 ShadowOffsetY int `json:"shadowOffsetY,omitempty"`
112
113 // Padding title space around content. See legend.textStyle.padding
114 // The unit is px. Default values for each position are 5.
115 // And they can be set to different values with left, right, top, and bottom.
116 Padding interface{} `json:"padding,omitempty"`
117
118 // compatible for WordCloud
119 Normal *TextStyle `json:"normal,omitempty"`
120 }