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
Copy file name to clipboardExpand all lines: README.md
+23-4Lines changed: 23 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,12 +30,12 @@ It will:
30
30
31
31
### Local Config
32
32
33
-
To customize the links of `echarts-examples` and other configurations, you can create a local config file `echarts-doc/config/env.dev-local.js`, which is not tracked by git, and its top-level properties will be used to override the corresponding properties of `echarts-doc/config/env.dev.js` when `npm run dev`.
33
+
To customize the links of `echarts-examples` and other configurations, you can create a local config file `echarts-doc/config/env.dev-override.js`, which is not tracked by git, and its top-level properties will be used to override the corresponding properties of `echarts-doc/config/env.dev.js` when `npm run dev`.
34
34
35
-
For example, create a `echarts-doc/config/env.dev-local.js`:
35
+
For example, create a `echarts-doc/config/env.dev-override.js`:
36
36
```js
37
37
module.exports= {
38
-
// These props will override the same props in `echarts-doc/config/env.dev-local.js`
38
+
// These props will override the same props in `echarts-doc/config/env.dev.js`
@@ -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:
Copy file name to clipboardExpand all lines: en/option/component/geo-common.md
+20-27Lines changed: 20 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,16 @@
1
1
2
2
{{ target: geo-common }}
3
3
4
+
{{ if: ${inMap} }}
5
+
{{ var: componentNameInLink = 'series-map' }}
6
+
{{ var: componentMainType = 'series' }}
7
+
{{ var: componentSubType = 'map' }}
8
+
{{ else }}
9
+
{{ var: componentNameInLink = 'geo' }}
10
+
{{ var: componentMainType = 'geo' }}
11
+
{{ var: componentSubType = null }}
12
+
{{ /if }}
13
+
4
14
#${prefix} map(string) = ''
5
15
6
16
Map name registered in [registerMap](api.html#echarts.registerMap).
@@ -75,9 +85,6 @@ See also [Flight Seatmap](${galleryEditorPath}geo-seatmap-flight).
75
85
76
86
The demo above shows that SVG format can be used in ECharts. See more info in [SVG Base Map](tutorial.html#SVG%20Base%20Map%20in%20Geo%20Coords%20and%20Map%20Series).
77
87
78
-
#${prefix} roam(boolean|string) = false
79
-
80
-
{{ use: partial-roam() }}
81
88
82
89
#${prefix} projection(Object)
83
90
@@ -154,28 +161,23 @@ series: {
154
161
155
162
Note: `stream` is not required in the `projection`.
156
163
157
-
#${prefix} center(Array)
158
164
159
-
Center of current view-port, in longitude and latitude by default. Use the projected coordinates if `projection` is set.
165
+
{{ use: partial-view-coord-sys-common(
166
+
prefix = ${prefix},
167
+
componentMainType = ${componentMainType},
168
+
componentSubType = ${componentSubType}
169
+
) }}
160
170
161
-
Example:
162
171
163
-
```ts
164
-
center: [115.97, 29.71]
165
-
```
172
+
#${prefix} aspectScale(number) = 0.75
166
173
167
-
```ts
168
-
projection: {
169
-
projection: (pt) =>project(pt)
170
-
},
171
-
center: project([115.97, 29.71])
172
-
```
174
+
Used to scale aspect of geo. It will be ignored if [proejction](~${componentNameInLink}.projection) is set.
173
175
174
-
#${prefix} aspectScale(number) = 0.75
176
+
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).
175
177
176
-
Used to scale aspect of geo. Will be ignored if `projection`is set.
178
+
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
179
178
-
The final aspect is calculated by: `geoBoundingRect.width / geoBoundingRect.height * aspectScale`.
180
+
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