You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It indicates the range of saturation (color alpha) for nodes in a level.
104
105
{{ else }}
105
106
It indicates the range of saturation (color alpha) for nodes of the series.
106
107
{{ /if }}
107
108
The range of values is 0 ~ 1.
108
109
109
-
//Bad
110
+
Bad:
110
111
It indicates the range of saturation (color alpha) {{ if: ${prefix} !== '#' }}for nodes in a level {{ else }} of the series{{ /if }}. The range of values is 0 ~ 1.
111
112
112
113
```
113
114
114
115
116
+
### Template Syntax
117
+
118
+
The template syntax follows [etpl](https://github.com/ecomfe/etpl/blob/master/doc/syntax.md) (but use `{{ }}` rather than `<!-- -->` as the interpolate tags).
119
+
> A syntax highlight tool: [etpl-vscode](https://marketplace.visualstudio.com/items?itemName=yibuyisheng.etpl-vscode)
120
+
121
+
Summary of the commonly used syntax:
122
+
```template
123
+
VARIABLE:
124
+
some text ${someVariable} some text
125
+
126
+
127
+
IF ELSE:
128
+
{{ if: ${number1} > 0 }}
129
+
some text xxx
130
+
{{ elif: ${string1} === 'abc' }}
131
+
some text yyy
132
+
{{ else }}
133
+
some text zzz
134
+
{{ /if }}
135
+
136
+
137
+
FOR LOOP:
138
+
{{ for: ${persons} as ${person}, ${index} }}
139
+
some text ${index}: ${person.name}
140
+
{{ /for }}
141
+
142
+
143
+
TARGET (DEFINE A BLOCK):
144
+
{{ target: a_predefined_block_name_1 }}
145
+
The input varA is ${varA}
146
+
The input varB is ${varB}
147
+
The input varC is ${varC}
148
+
some other text xxx
149
+
(The close target can be omitted, but not recommended.)
150
+
{{ /target }}
151
+
152
+
153
+
USE (USE A BLOCK):
154
+
{{ use: a_predefined_block_name_1(
155
+
varA = ${myVarX},
156
+
varB = 123,
157
+
varC = 'some string'
158
+
)}}
159
+
{{ use: a_predefined_block_name_2 }}
160
+
```
161
+
162
+
115
163
### Document Embedded Examples
116
164
117
165
Declare the base echarts options (`ExampleBaseOption`), whose scope is each echarts component or series. A `ExampleBaseOption` can be shared by multiple options. e.g.,
0 commit comments