Skip to content

Commit

Permalink
docs: china border (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei committed Dec 28, 2021
1 parent 565f9fd commit 498ac98
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
6 changes: 0 additions & 6 deletions website/docs/api/components/tooltip.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ tooltip 相对锚点的位置,支持以下相对锚点的位置:

tooltip 相对锚点的偏移量。

### `tooltip.`offsets

`number[]` optional default: `[15, 0]`

tooltip 相对锚点的偏移量。

### `tooltip.`customContent

`Function: (title: string, items: TooltipListItem[]) => string|HTMLElement` optional
Expand Down
11 changes: 9 additions & 2 deletions website/docs/api/plots/choropleth.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,16 @@ const choropleth = new Choropleth(container, options);

### `options.`chinaBorder

`boolean` optional default: `ture`
`boolean|ChinaBoundaryStyle` optional default: `ture`

是否显示中国国界线。
是否显示中国国界线,国界线样式 ChinaBoundaryStyle 配置如下:

| 属性 | 描述 | 类型 | 默认值 | 是否必填 |
| -------- | ---- | ------------------------ | ----------------------------------------------------------- | -------- |
| national | 国界 | `LinesLayerStyleOptions` | `{ color: 'red', width: 1, opacity: 1 }` | optional |
| dispute | 争议 | `LinesLayerStyleOptions` | `{ color: 'red', width: 1, opacity: 1, dashArray: [1, 6] }` | optional |
| coast | 海洋 | `LinesLayerStyleOptions` | `{ color: 'blue', width: 1, opacity: 1 }` | optional |
| hkm | 港澳 | `LinesLayerStyleOptions` | `{ color: 'gray', width: 1, opacity: 1 }` | optional |

### `options.`drill

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function AdministrativeSwitch() {

const chinaMap = new Choropleth('mapContainer', {
map: {
type: 'amap',
type: 'mapbox',
style: 'blank',
center: [120.19382669582967, 30.258134],
zoom: 3,
Expand Down Expand Up @@ -61,6 +61,16 @@ function AdministrativeSwitch() {
lineWidth: 0.6,
lineOpacity: 1,
},
chinaBorder: {
// 国界
national: { color: '#ccc', width: 1, opacity: 1 },
// 争议
dispute: { color: '#ccc', width: 1, opacity: 0.8, dashArray: [2, 2] },
// 海洋
coast: { color: '#ccc', width: 0.7, opacity: 0.8 },
// 港澳
hkm: { color: 'gray', width: 0.7, opacity: 0.8 },
},
label: {
visible: true,
field: 'name',
Expand Down

0 comments on commit 498ac98

Please sign in to comment.