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
@@ -210,7 +223,8 @@ Declaration or assignment of a target-local variable:
210
223
{{ var: myVar = 'some' }}
211
224
{{ var: myVar = 123 }}
212
225
{{ var: myVar = ${someOtherStr} + 'some_str' }}
213
-
226
+
NOTICE:
227
+
Within a `{{` `}}` pair, DO NOT write {{ if: '${some}_abc' }}{{ /if }}. It should be {{ if: ${some} + '_abc' }}{{ /if }}, as the sentence within `{{` `}}` pair is treated like a normal JS expression.
214
228
215
229
--- IF ELSE ---
216
230
{{ if: ${number1} > 0 }}
@@ -220,6 +234,11 @@ some text yyy
220
234
{{ else }}
221
235
some text zzz
222
236
{{ /if }}
237
+
Logical operators can be used in the conditional expression:
Used to scale aspect of geo. Will be ignored if `projection` is set.
182
+
Used to scale aspect of geo. It will be ignored if [proejction](~${componentNameInLink}.projection) is set.
183
+
184
+
The final calculated `pixelWidth` and `pixelHeight` of the map will satisfy `pixelWidth / pixelHeight = lngSpan / latSpan * aspectScale` (assume [proejction](~${componentNameInLink}.projection) is not specified, and [preserveAspect](~${componentNameInLink}.preserveAspect) is truthy).
185
+
186
+
If no [proejction](~${componentNameInLink}.projection) is applied, the latitudes and longitudes in GeoJSON are linearly mapped to pixel coordinates diarectly. `aspectScale` offers a simple way to visually compensates for the distortion caused by the fact that the longitudinal spacing shrinks as latitude increases. For example, an `aspectScale` can be roughly calculated as `aspectScale = Math.cos(center_latitude * Maht.PI / 180)`, which is similar to a sinusoidal projection.
177
187
178
-
The final aspect is calculated by: `geoBoundingRect.width / geoBoundingRect.height * aspectScale`.
188
+
See [example](${galleryEditorPath}geo-graph&edit=1&reset=1).
Copy file name to clipboardExpand all lines: en/option/component/grid.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,15 @@
3
3
4
4
# grid(Object)
5
5
6
-
Drawing grid in rectangular coordinate. In a single grid, at most two X and Y axes each is allowed. [Line chart](~series-line), [bar chart](~series-bar), and [scatter chart (bubble chart)](~series-scatter) can be drawn in grid.
6
+
The `grid component` is a rectangular container, used to lay out two-dimensional rectangular coordinate system (also known as `cartesian2d` coordinate system).
7
7
8
-
In ECharts 2.x, there could only be one single grid component at most in a single echarts instance. But in ECharts 3, there is no limitation.
8
+
A `cartesian2d` coordinate system is composed fo an [xAxis](~xAixs) and a [yAxis](~yAxis). Multiple `cartesian2d` coordinate systems can be arranged within a single `grid component` - that is, multiple [xAxis](~xAixs) and multiple [yAxis](~yAxis) instances can be configured within one `grid component`.
9
+
10
+
An [xAxis](~xAixs) or a [yAxis](~yAxis) can be shared by multiple `cartesian2d` coordinate systems. For example, one [xAxis](~xAixs) and two [yAxis](~yAxis) form two `cartesian2d` coordinate systems.
11
+
12
+
[Line chart](~series-line), [bar chart](~series-bar), and [scatter chart (bubble chart)](~series-scatter), etc., can be drawn in `grid component`.
13
+
14
+
> In ECharts 2.x, there could only be one single grid component at most in a single echarts instance. But since ECharts 3, there is no limitation.
9
15
10
16
**Following is an example of Anscombe Quartet:**
11
17
@@ -82,6 +88,7 @@ See also [outerBounds example](${galleryEditorPath}doc-example/grid-outerBounds&
82
88
83
89
{{ use: partial-rect-layout-width-height(
84
90
hostName = "`outerBounds`",
91
+
version = "6.0.0",
85
92
noZ = true,
86
93
prefix = '##',
87
94
defaultLeft = 0,
@@ -113,3 +120,11 @@ See also [outerBounds example](${galleryEditorPath}doc-example/grid-outerBounds&
0 commit comments