Skip to content

Commit

Permalink
docs: 图层属性配置颜色划分默认值更改 (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: yxh01132861 <[email protected]>
  • Loading branch information
simplexiao and yxh01132861 authored Oct 28, 2022
1 parent 825354d commit 98d9074
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ChoroplethLayerStyleAttributeValue, ChoroplethLayerProps } from '@antv/larkmap';
import { LarkMap, ChoroplethLayer, CustomControl, ChoroplethLayerStyleAttribute } from '@antv/larkmap';
import React, { useEffect, useState } from 'react';
import type { ChoroplethLayerProps, ChoroplethLayerStyleAttributeValue } from '@antv/larkmap';
import { ChoroplethLayer, ChoroplethLayerStyleAttribute, CustomControl, LarkMap } from '@antv/larkmap';
import 'antd/dist/antd.css';
import React, { useEffect, useState } from 'react';

const FieldList = [
{ type: 'string', lable: '区域名称', value: 'name', typeColor: 'green', typeName: '文本' },
Expand All @@ -11,6 +11,7 @@ const DefaultChoroplethLayerStyle = {
fillColor: {
field: 'adcode',
value: ['#0f9960', '#33a02c', '#377eb8'],
scale: { type: 'quantile' },
},
opacity: 0.3,
strokeColor: 'blue',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import type { LineLayerStyleAttributeValue, LineLayerProps } from '@antv/larkmap';
import { LarkMap, LineLayer, CustomControl, LineLayerStyleAttribute } from '@antv/larkmap';
import React, { useEffect, useState } from 'react';
import type { LineLayerProps, LineLayerStyleAttributeValue } from '@antv/larkmap';
import { CustomControl, LarkMap, LineLayer, LineLayerStyleAttribute } from '@antv/larkmap';
import 'antd/dist/antd.css';
import React, { useEffect, useState } from 'react';

const FieldList = [
{ type: 'string', lable: '名称', value: 'line_name', typeColor: 'green', typeName: '文本' },
{ type: 'number', lable: 'id', value: 'line_id', typeColor: 'green', typeName: '文本' },
];
const DefaultLineLayerStyle = {
color: {
field: 'line_name',
field: 'line_id',
value: ['#5B8FF9', '#5CCEA1', '#5D7092'],
scale: { type: 'quantile' },
},
size: 1.5,
style: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/LayerAttribute/LineLayerStyle/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default (fieldList: FieldSelectOptionType[] = [], ribbonList: string[][]
fillColorScale: {
type: 'string',
title: '颜色划分',
default: 'quantize',
default: 'quantile',
enum: [
{
label: '等比',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default (fieldList: FieldSelectOptionType[] = [], ribbonList: string[][]
fillColorScale: {
type: 'string',
title: '颜色划分',
default: 'quantize',
default: 'quantile',
enum: [
{
label: '等比',
Expand Down

0 comments on commit 98d9074

Please sign in to comment.