diff --git a/src/components/LayerAttribute/ChoroplethLayerStyle/demos/default.tsx b/src/components/LayerAttribute/ChoroplethLayerStyle/demos/default.tsx index 7fe627dd..5f1102d8 100644 --- a/src/components/LayerAttribute/ChoroplethLayerStyle/demos/default.tsx +++ b/src/components/LayerAttribute/ChoroplethLayerStyle/demos/default.tsx @@ -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: '文本' }, @@ -11,6 +11,7 @@ const DefaultChoroplethLayerStyle = { fillColor: { field: 'adcode', value: ['#0f9960', '#33a02c', '#377eb8'], + scale: { type: 'quantile' }, }, opacity: 0.3, strokeColor: 'blue', diff --git a/src/components/LayerAttribute/LineLayerStyle/demos/default.tsx b/src/components/LayerAttribute/LineLayerStyle/demos/default.tsx index d4befec5..5b0225ac 100644 --- a/src/components/LayerAttribute/LineLayerStyle/demos/default.tsx +++ b/src/components/LayerAttribute/LineLayerStyle/demos/default.tsx @@ -1,7 +1,7 @@ -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: '文本' }, @@ -9,8 +9,9 @@ const FieldList = [ ]; const DefaultLineLayerStyle = { color: { - field: 'line_name', + field: 'line_id', value: ['#5B8FF9', '#5CCEA1', '#5D7092'], + scale: { type: 'quantile' }, }, size: 1.5, style: { diff --git a/src/components/LayerAttribute/LineLayerStyle/schema.ts b/src/components/LayerAttribute/LineLayerStyle/schema.ts index 0f9c9eb0..a004240e 100644 --- a/src/components/LayerAttribute/LineLayerStyle/schema.ts +++ b/src/components/LayerAttribute/LineLayerStyle/schema.ts @@ -38,7 +38,7 @@ export default (fieldList: FieldSelectOptionType[] = [], ribbonList: string[][] fillColorScale: { type: 'string', title: '颜色划分', - default: 'quantize', + default: 'quantile', enum: [ { label: '等比', diff --git a/src/components/LayerAttribute/common-schema/fill-color-collapse.ts b/src/components/LayerAttribute/common-schema/fill-color-collapse.ts index 2ca176fb..35d46bad 100644 --- a/src/components/LayerAttribute/common-schema/fill-color-collapse.ts +++ b/src/components/LayerAttribute/common-schema/fill-color-collapse.ts @@ -35,7 +35,7 @@ export default (fieldList: FieldSelectOptionType[] = [], ribbonList: string[][] fillColorScale: { type: 'string', title: '颜色划分', - default: 'quantize', + default: 'quantile', enum: [ { label: '等比',