@antv/g2 4.1.49 → 4.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g2.min.js +3 -31
- package/dist/g2.min.js.map +1 -1
- package/esm/chart/chart.js +1 -1
- package/esm/chart/chart.js.map +1 -1
- package/esm/core.d.ts +1 -1
- package/esm/core.js +1 -1
- package/esm/core.js.map +1 -1
- package/esm/index.js +7 -0
- package/esm/index.js.map +1 -1
- package/esm/interaction/action/component/axis/axis-description.d.ts +9 -0
- package/esm/interaction/action/component/axis/axis-description.js +77 -0
- package/esm/interaction/action/component/axis/axis-description.js.map +1 -0
- package/esm/interface.d.ts +6 -2
- package/esm/interface.js.map +1 -1
- package/esm/theme/style-sheet/dark.d.ts +2 -0
- package/esm/theme/style-sheet/dark.js +2 -0
- package/esm/theme/style-sheet/dark.js.map +1 -1
- package/esm/theme/style-sheet/light.d.ts +2 -0
- package/esm/theme/style-sheet/light.js +2 -0
- package/esm/theme/style-sheet/light.js.map +1 -1
- package/esm/theme/util/create-by-style-sheet.js +3 -0
- package/esm/theme/util/create-by-style-sheet.js.map +1 -1
- package/lib/animate/animation/sector-path-update.js +2 -2
- package/lib/animate/animation/sector-path-update.js.map +1 -1
- package/lib/animate/animation/wave-in.js +1 -1
- package/lib/animate/animation/wave-in.js.map +1 -1
- package/lib/animate/animation/zoom.js +1 -1
- package/lib/animate/animation/zoom.js.map +1 -1
- package/lib/animate/index.js +1 -1
- package/lib/animate/index.js.map +1 -1
- package/lib/api.js +1 -1
- package/lib/api.js.map +1 -1
- package/lib/base.js +2 -2
- package/lib/base.js.map +1 -1
- package/lib/chart/chart.js +4 -4
- package/lib/chart/chart.js.map +1 -1
- package/lib/chart/controller/annotation.js +33 -33
- package/lib/chart/controller/annotation.js.map +1 -1
- package/lib/chart/controller/axis.js +4 -4
- package/lib/chart/controller/axis.js.map +1 -1
- package/lib/chart/controller/coordinate.js +2 -2
- package/lib/chart/controller/coordinate.js.map +1 -1
- package/lib/chart/controller/gesture.js +1 -1
- package/lib/chart/controller/gesture.js.map +1 -1
- package/lib/chart/controller/legend.js +1 -1
- package/lib/chart/controller/legend.js.map +1 -1
- package/lib/chart/controller/scrollbar.js +9 -9
- package/lib/chart/controller/scrollbar.js.map +1 -1
- package/lib/chart/controller/slider.js +6 -6
- package/lib/chart/controller/slider.js.map +1 -1
- package/lib/chart/controller/tooltip.js +7 -7
- package/lib/chart/controller/tooltip.js.map +1 -1
- package/lib/chart/layout/auto.js +1 -1
- package/lib/chart/layout/auto.js.map +1 -1
- package/lib/chart/layout/padding-cal.js +1 -1
- package/lib/chart/layout/padding-cal.js.map +1 -1
- package/lib/chart/view.js +13 -13
- package/lib/chart/view.js.map +1 -1
- package/lib/component/labels.js +7 -7
- package/lib/component/labels.js.map +1 -1
- package/lib/core.d.ts +1 -1
- package/lib/core.js +7 -7
- package/lib/core.js.map +1 -1
- package/lib/facet/circle.js +1 -1
- package/lib/facet/circle.js.map +1 -1
- package/lib/facet/list.js +3 -3
- package/lib/facet/list.js.map +1 -1
- package/lib/facet/matrix.js +5 -5
- package/lib/facet/matrix.js.map +1 -1
- package/lib/facet/mirror.js +2 -2
- package/lib/facet/mirror.js.map +1 -1
- package/lib/facet/rect.js +7 -7
- package/lib/facet/rect.js.map +1 -1
- package/lib/facet/tree.js +3 -3
- package/lib/facet/tree.js.map +1 -1
- package/lib/geometry/area.js +2 -2
- package/lib/geometry/area.js.map +1 -1
- package/lib/geometry/base.js +6 -6
- package/lib/geometry/base.js.map +1 -1
- package/lib/geometry/edge.js +2 -2
- package/lib/geometry/edge.js.map +1 -1
- package/lib/geometry/element/index.js +5 -5
- package/lib/geometry/element/index.js.map +1 -1
- package/lib/geometry/heatmap.js +4 -4
- package/lib/geometry/heatmap.js.map +1 -1
- package/lib/geometry/interval.js +2 -2
- package/lib/geometry/interval.js.map +1 -1
- package/lib/geometry/label/base.js +3 -3
- package/lib/geometry/label/base.js.map +1 -1
- package/lib/geometry/label/interval.js +5 -5
- package/lib/geometry/label/interval.js.map +1 -1
- package/lib/geometry/label/pie.js +3 -3
- package/lib/geometry/label/pie.js.map +1 -1
- package/lib/geometry/label/polar.js +4 -4
- package/lib/geometry/label/polar.js.map +1 -1
- package/lib/geometry/line.js +2 -2
- package/lib/geometry/line.js.map +1 -1
- package/lib/geometry/path.js +3 -3
- package/lib/geometry/path.js.map +1 -1
- package/lib/geometry/point.js +3 -3
- package/lib/geometry/point.js.map +1 -1
- package/lib/geometry/polygon.js +2 -2
- package/lib/geometry/polygon.js.map +1 -1
- package/lib/geometry/schema.js +2 -2
- package/lib/geometry/schema.js.map +1 -1
- package/lib/geometry/shape/base.js +2 -2
- package/lib/geometry/shape/base.js.map +1 -1
- package/lib/geometry/shape/edge/arc.js +3 -3
- package/lib/geometry/shape/edge/arc.js.map +1 -1
- package/lib/geometry/shape/edge/index.js +1 -1
- package/lib/geometry/shape/edge/index.js.map +1 -1
- package/lib/geometry/shape/edge/smooth.js +1 -1
- package/lib/geometry/shape/edge/smooth.js.map +1 -1
- package/lib/geometry/shape/edge/vhv.js +1 -1
- package/lib/geometry/shape/edge/vhv.js.map +1 -1
- package/lib/geometry/shape/interval/funnel.js +1 -1
- package/lib/geometry/shape/interval/funnel.js.map +1 -1
- package/lib/geometry/shape/interval/hollow-rect.js +2 -2
- package/lib/geometry/shape/interval/hollow-rect.js.map +1 -1
- package/lib/geometry/shape/interval/index.js +2 -2
- package/lib/geometry/shape/interval/index.js.map +1 -1
- package/lib/geometry/shape/interval/line.js +2 -2
- package/lib/geometry/shape/interval/line.js.map +1 -1
- package/lib/geometry/shape/interval/pyramid.js +1 -1
- package/lib/geometry/shape/interval/pyramid.js.map +1 -1
- package/lib/geometry/shape/interval/tick.js +1 -1
- package/lib/geometry/shape/interval/tick.js.map +1 -1
- package/lib/geometry/shape/interval/util.js +1 -1
- package/lib/geometry/shape/interval/util.js.map +1 -1
- package/lib/geometry/shape/line/step.js +1 -1
- package/lib/geometry/shape/line/step.js.map +1 -1
- package/lib/geometry/shape/point/util.js +2 -2
- package/lib/geometry/shape/point/util.js.map +1 -1
- package/lib/geometry/shape/polygon/index.js +1 -1
- package/lib/geometry/shape/polygon/index.js.map +1 -1
- package/lib/geometry/shape/polygon/square.js +1 -1
- package/lib/geometry/shape/polygon/square.js.map +1 -1
- package/lib/geometry/shape/schema/box.js +1 -1
- package/lib/geometry/shape/schema/box.js.map +1 -1
- package/lib/geometry/shape/schema/candle.js +1 -1
- package/lib/geometry/shape/schema/candle.js.map +1 -1
- package/lib/geometry/shape/util/get-style.js +1 -1
- package/lib/geometry/shape/util/get-style.js.map +1 -1
- package/lib/geometry/shape/violin/hollow.js +2 -2
- package/lib/geometry/shape/violin/hollow.js.map +1 -1
- package/lib/geometry/shape/violin/index.js +1 -1
- package/lib/geometry/shape/violin/index.js.map +1 -1
- package/lib/geometry/shape/violin/smooth.js +1 -1
- package/lib/geometry/shape/violin/smooth.js.map +1 -1
- package/lib/geometry/violin.js +2 -2
- package/lib/geometry/violin.js.map +1 -1
- package/lib/index.js +76 -69
- package/lib/index.js.map +1 -1
- package/lib/interaction/action/active-region.js +3 -3
- package/lib/interaction/action/active-region.js.map +1 -1
- package/lib/interaction/action/callback.js +2 -2
- package/lib/interaction/action/callback.js.map +1 -1
- package/lib/interaction/action/component/axis/axis-description.d.ts +9 -0
- package/lib/interaction/action/component/axis/axis-description.js +79 -0
- package/lib/interaction/action/component/axis/axis-description.js.map +1 -0
- package/lib/interaction/action/component/list-active.js +2 -2
- package/lib/interaction/action/component/list-active.js.map +1 -1
- package/lib/interaction/action/component/list-checked.js +2 -2
- package/lib/interaction/action/component/list-checked.js.map +1 -1
- package/lib/interaction/action/component/list-focus.js +2 -2
- package/lib/interaction/action/component/list-focus.js.map +1 -1
- package/lib/interaction/action/component/list-highlight.js +2 -2
- package/lib/interaction/action/component/list-highlight.js.map +1 -1
- package/lib/interaction/action/component/list-radio.js +3 -3
- package/lib/interaction/action/component/list-radio.js.map +1 -1
- package/lib/interaction/action/component/list-selected.js +2 -2
- package/lib/interaction/action/component/list-selected.js.map +1 -1
- package/lib/interaction/action/component/list-state.js +2 -2
- package/lib/interaction/action/component/list-state.js.map +1 -1
- package/lib/interaction/action/component/list-unchecked.js +2 -2
- package/lib/interaction/action/component/list-unchecked.js.map +1 -1
- package/lib/interaction/action/component/tooltip/ellipsis-text.js +4 -4
- package/lib/interaction/action/component/tooltip/ellipsis-text.js.map +1 -1
- package/lib/interaction/action/component/tooltip/geometry.js +2 -2
- package/lib/interaction/action/component/tooltip/geometry.js.map +1 -1
- package/lib/interaction/action/component/tooltip/sibling.js +2 -2
- package/lib/interaction/action/component/tooltip/sibling.js.map +1 -1
- package/lib/interaction/action/cursor.js +2 -2
- package/lib/interaction/action/cursor.js.map +1 -1
- package/lib/interaction/action/data/filter.js +2 -2
- package/lib/interaction/action/data/filter.js.map +1 -1
- package/lib/interaction/action/data/range-filter.js +2 -2
- package/lib/interaction/action/data/range-filter.js.map +1 -1
- package/lib/interaction/action/data/sibling-filter.js +2 -2
- package/lib/interaction/action/data/sibling-filter.js.map +1 -1
- package/lib/interaction/action/element/active.js +2 -2
- package/lib/interaction/action/element/active.js.map +1 -1
- package/lib/interaction/action/element/filter.js +2 -2
- package/lib/interaction/action/element/filter.js.map +1 -1
- package/lib/interaction/action/element/highlight-by-color.js +2 -2
- package/lib/interaction/action/element/highlight-by-color.js.map +1 -1
- package/lib/interaction/action/element/highlight-by-x.js +2 -2
- package/lib/interaction/action/element/highlight-by-x.js.map +1 -1
- package/lib/interaction/action/element/highlight.js +2 -2
- package/lib/interaction/action/element/highlight.js.map +1 -1
- package/lib/interaction/action/element/link-by-color.js +3 -3
- package/lib/interaction/action/element/link-by-color.js.map +1 -1
- package/lib/interaction/action/element/range-active.js +2 -2
- package/lib/interaction/action/element/range-active.js.map +1 -1
- package/lib/interaction/action/element/range-highlight.js +2 -2
- package/lib/interaction/action/element/range-highlight.js.map +1 -1
- package/lib/interaction/action/element/range-selected.js +2 -2
- package/lib/interaction/action/element/range-selected.js.map +1 -1
- package/lib/interaction/action/element/range-state.js +2 -2
- package/lib/interaction/action/element/range-state.js.map +1 -1
- package/lib/interaction/action/element/selected.js +2 -2
- package/lib/interaction/action/element/selected.js.map +1 -1
- package/lib/interaction/action/element/sibling-filter.js +2 -2
- package/lib/interaction/action/element/sibling-filter.js.map +1 -1
- package/lib/interaction/action/element/single-active.js +2 -2
- package/lib/interaction/action/element/single-active.js.map +1 -1
- package/lib/interaction/action/element/single-highlight.js +2 -2
- package/lib/interaction/action/element/single-highlight.js.map +1 -1
- package/lib/interaction/action/element/single-selected.js +2 -2
- package/lib/interaction/action/element/single-selected.js.map +1 -1
- package/lib/interaction/action/element/single-state.js +2 -2
- package/lib/interaction/action/element/single-state.js.map +1 -1
- package/lib/interaction/action/element/state-base.js +2 -2
- package/lib/interaction/action/element/state-base.js.map +1 -1
- package/lib/interaction/action/element/state.js +2 -2
- package/lib/interaction/action/element/state.js.map +1 -1
- package/lib/interaction/action/mask/base.js +3 -3
- package/lib/interaction/action/mask/base.js.map +1 -1
- package/lib/interaction/action/mask/circle.js +2 -2
- package/lib/interaction/action/mask/circle.js.map +1 -1
- package/lib/interaction/action/mask/dim-rect.js +2 -2
- package/lib/interaction/action/mask/dim-rect.js.map +1 -1
- package/lib/interaction/action/mask/path.js +2 -2
- package/lib/interaction/action/mask/path.js.map +1 -1
- package/lib/interaction/action/mask/rect.js +2 -2
- package/lib/interaction/action/mask/rect.js.map +1 -1
- package/lib/interaction/action/mask/smooth-path.js +2 -2
- package/lib/interaction/action/mask/smooth-path.js.map +1 -1
- package/lib/interaction/action/register.js +1 -1
- package/lib/interaction/action/register.js.map +1 -1
- package/lib/interaction/action/view/button.js +4 -4
- package/lib/interaction/action/view/button.js.map +1 -1
- package/lib/interaction/action/view/drag.js +2 -2
- package/lib/interaction/action/view/drag.js.map +1 -1
- package/lib/interaction/action/view/mousewheel-scroll.js +1 -1
- package/lib/interaction/action/view/mousewheel-scroll.js.map +1 -1
- package/lib/interaction/action/view/move.js +1 -1
- package/lib/interaction/action/view/move.js.map +1 -1
- package/lib/interaction/action/view/scale-transform.js +1 -1
- package/lib/interaction/action/view/scale-transform.js.map +1 -1
- package/lib/interaction/action/view/scale-translate.js +2 -2
- package/lib/interaction/action/view/scale-translate.js.map +1 -1
- package/lib/interaction/action/view/scale-zoom.js +2 -2
- package/lib/interaction/action/view/scale-zoom.js.map +1 -1
- package/lib/interaction/grammar-interaction.js +3 -3
- package/lib/interaction/grammar-interaction.js.map +1 -1
- package/lib/interaction/index.js +2 -2
- package/lib/interaction/index.js.map +1 -1
- package/lib/interface.d.ts +6 -2
- package/lib/interface.js.map +1 -1
- package/lib/theme/style-sheet/dark.d.ts +2 -0
- package/lib/theme/style-sheet/dark.js +3 -1
- package/lib/theme/style-sheet/dark.js.map +1 -1
- package/lib/theme/style-sheet/light.d.ts +2 -0
- package/lib/theme/style-sheet/light.js +3 -1
- package/lib/theme/style-sheet/light.js.map +1 -1
- package/lib/theme/util/create-by-style-sheet.js +11 -8
- package/lib/theme/util/create-by-style-sheet.js.map +1 -1
- package/lib/theme/util/create-theme.js +1 -1
- package/lib/theme/util/create-theme.js.map +1 -1
- package/lib/util/attr.js +1 -1
- package/lib/util/attr.js.map +1 -1
- package/lib/util/collision-detect.js +1 -1
- package/lib/util/collision-detect.js.map +1 -1
- package/lib/util/color.js +1 -1
- package/lib/util/color.js.map +1 -1
- package/lib/util/legend.js +2 -2
- package/lib/util/legend.js.map +1 -1
- package/lib/util/padding.js +2 -2
- package/lib/util/padding.js.map +1 -1
- package/lib/util/scale.js +2 -2
- package/lib/util/scale.js.map +1 -1
- package/lib/util/stat.js +1 -1
- package/lib/util/stat.js.map +1 -1
- package/lib/util/text.js +1 -1
- package/lib/util/text.js.map +1 -1
- package/lib/util/tooltip.js +1 -1
- package/lib/util/tooltip.js.map +1 -1
- package/package.json +2 -2
- package/src/chart/chart.ts +1 -1
- package/src/core.ts +1 -1
- package/src/index.ts +8 -0
- package/src/interaction/action/component/axis/axis-description.ts +86 -0
- package/src/interface.ts +6 -3
- package/src/theme/style-sheet/dark.ts +2 -0
- package/src/theme/style-sheet/light.ts +2 -0
- package/src/theme/util/create-by-style-sheet.ts +3 -0
- package/CHANGELOG.md +0 -1331
package/lib/interface.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import { COMPONENT_TYPE, DIRECTION, LAYER } from './constant';\nimport {\n AxisLabelCfg,\n AxisLineCfg,\n AxisSubTickLineCfg,\n AxisTickLineCfg,\n AxisTitleCfg,\n ContinueLegendHandlerCfg,\n ContinueLegendLabelCfg,\n ContinueLegendRailCfg,\n ContinueLegendTrackCfg,\n Coordinate,\n CrosshairLineCfg,\n CrosshairTextBackgroundCfg,\n CrosshairTextCfg,\n EnhancedTextCfg,\n GridLineCfg,\n GroupComponent,\n HtmlComponent,\n ICanvas,\n IGroup,\n IShape,\n CategoryLegendCfg,\n LegendBackgroundCfg,\n LegendItemNameCfg,\n LegendItemValueCfg,\n LegendMarkerCfg,\n LegendTitleCfg,\n LegendPageNavigatorCfg,\n PathCommand,\n Scale,\n ScaleConfig,\n ShapeAttrs,\n LineAnnotationTextCfg,\n TrendCfg,\n} from './dependents';\n\nimport { View } from './chart';\nimport { Facet } from './facet';\nimport Element from './geometry/element';\nimport { PaddingCalCtor } from './chart/layout/padding-cal';\nimport { LegendRadio } from '@antv/component';\n\n// ============================ 基础类型 ============================\n/**\n * @title 通用对象\n */\nexport interface LooseObject {\n [key: string]: any;\n}\n\n/**\n * @title 一个点位置\n */\nexport interface Point {\n readonly x: number;\n readonly y: number;\n}\n\n/**\n * @title 画布范围\n */\nexport interface Region {\n readonly start: Point;\n readonly end: Point;\n}\n\n/**\n * @title 画布大小\n */\nexport interface Size {\n readonly width: number;\n readonly height: number;\n}\n\n/**\n * @title 带范围的点结构\n */\nexport interface RangePoint {\n readonly x?: number | number[];\n readonly y?: number | number[];\n}\n\n/**\n * WAI-ARIA 无障碍标签配置\n */\nexport type AriaOption =\n | false\n | {\n readonly label: string;\n };\n\n/**\n * @title 用户数据经过图形映射处理后的数据结构\n */\nexport interface MappingDatum {\n /**\n * @title 原始数据\n */\n _origin: Datum;\n /**\n * @title shape 的关键点信息\n */\n points?: ShapeVertices;\n /**\n * @title 相对于当前 shape 的下一个 shape 的关键点信息\n */\n nextPoints?: ShapeVertices;\n /**\n * @title x 轴的坐标\n */\n x?: number[] | number;\n /**\n * @title y 轴的坐标\n */\n y?: number[] | number;\n /**\n * @title 颜色\n */\n color?: string;\n /**\n * @title 渲染的 shape 类型\n */\n shape?: string | string[];\n /**\n * @title 大小\n */\n size?: number;\n}\n\n/**\n * @title 绘制 Shape 需要的图形、样式、关键点等信息\n */\nexport interface ShapeInfo {\n /**\n * @title x 坐标\n */\n x: number | number[];\n /**\n * @title y 坐标\n */\n y: number | number[];\n /**\n * @title 映射的 shape 类型\n */\n shape?: string | string[];\n /**\n * @title size 映射值\n */\n size?: number;\n /**\n * @title 映射的颜色值\n */\n color?: string;\n /**\n * @title 用户设置的图形样式\n */\n style?: LooseObject;\n /**\n * @title 是否在极坐标下\n */\n isInCircle?: boolean;\n /**\n * @title 对应的原始数据记录\n */\n data?: Datum | Data;\n /**\n * @title 存储进行图形映射后的数据\n */\n mappingData?: MappingDatum | MappingDatum[];\n /**\n * @title 构成 shape 的关键点\n */\n points?: ShapeVertices;\n /**\n * @title 下一个数据集对应的关键点\n */\n nextPoints?: ShapeVertices;\n /**\n * @title Geometry.Text 需要\n */\n text?: string;\n /**\n * @title 数据是否发生层叠\n */\n isStack?: boolean;\n /**\n * @title 是否连接空值,只对 Path Line Area 这三种 Geometry 生效。\n */\n connectNulls?: boolean;\n /**\n * @title shape 背景,只对 Interval Geometry 生效,目前只对 interval-rect shape 生效。\n */\n background?: {\n style?: ShapeAttrs;\n };\n /**\n * @title 是否展示单个孤立的数据点,只对 Path Line Area 这三种 Geometry 生效。\n */\n showSinglePoint?: boolean;\n /**\n * @title 默认的 shape 样式\n */\n defaultStyle?: LooseObject;\n /**\n * @title 自定义的数据,传入到 shapeInfo 中\n */\n customInfo?: CustomOption;\n}\n\n/**\n * @title 用户配置的动画,属性均可选\n */\nexport interface AnimateCfg {\n /**\n * @title 动画缓动函数\n */\n readonly easing?: string | AnimateEasingCallback;\n /**\n * @title 动画执行函数\n */\n readonly animation?: string;\n /**\n * @title 动画执行时间\n */\n readonly duration?: number | AnimateDurationCallback;\n /**\n * @title 动画延迟时间\n */\n readonly delay?: number | AnimateDelayCallback;\n /**\n * @title 动画执行结束后的回调函数\n */\n readonly callback?: () => any;\n /**\n * @title 动画是否重复\n */\n readonly repeat?: boolean;\n}\n\n/**\n * @title 传递给 G 的动画配置,duration 必须提供\n */\nexport interface GAnimateCfg {\n /**\n * @title 动画执行时间\n */\n readonly duration: number;\n /**\n * @title 动画缓动函数\n */\n readonly easing?: string;\n /**\n * @title 动画执行函数\n */\n readonly animation?: string;\n /**\n * @title 动画延迟时间\n */\n readonly delay?: number;\n /**\n * @title 动画执行结束后的回调函数\n */\n readonly callback?: () => any;\n /**\n * @title 动画是否重复\n */\n readonly repeat?: boolean;\n}\n\n// ============================ Geometry 接口相关的类型定义 ============================\n/**\n * @title 图形属性配置项定义,如 geometry.position({})\n */\nexport interface AttributeOption {\n /**\n * @title 映射的属性字段。\n */\n fields?: string[];\n /**\n * @title 回调函数。\n */\n callback?: (...args) => any;\n /**\n * @title 指定常量映射规则。\n */\n values?: any[];\n}\n\n/**\n * @title 数据调整配置项定义,`geometry.adjust({})`\n */\nexport interface AdjustOption {\n /**\n * @title 数据调整类型。\n */\n readonly type: AdjustType;\n /**\n * @title 间距\n * @description 该属性只对 'dodge' 类型生效,取 0 到 1 范围的值(相对于每个柱子宽度),用于控制一个分组中柱子之间的间距。\n * @see \n */\n readonly marginRatio?: number;\n /**\n * @title 分组字段\n * @description 该属性只对 'dodge' 类型生效,声明以哪个数据字段为分组依据。\n */\n readonly dodgeBy?: string;\n /**\n * @title 是否反序\n * @description 该属性只对 'stack' 类型生效,用于控制是否对数据进行反序操作。\n */\n readonly reverseOrder?: boolean;\n}\n\n/**\n * @title `geometry.style({})` 样式配置定义\n */\nexport interface StyleOption {\n /**\n * @title 映射的字段。\n */\n readonly fields?: string[];\n /**\n * @title 回调函数。\n */\n readonly callback?: (...args) => LooseObject;\n /**\n * @title 图形样式配置。\n */\n readonly cfg?: LooseObject;\n}\n\n/**\n * @title geometry.custom() custom 自定义的配置,可以传入任何数据\n */\nexport type CustomOption = any;\n\n/**\n * @title `geometry.tooltip({})` Tooltip 配置定义\n */\nexport interface GeometryTooltipOption {\n /**\n * @title 参与映射的字段。\n */\n readonly fields: string[];\n /**\n * @title 回调函数。\n */\n readonly callback?: (...args) => LooseObject;\n}\n\nexport interface GeometryLabelLayoutCfg {\n /**\n * @title label 布局类型。\n */\n type: string;\n /**\n * @title 各个布局函数开放给用户的配置。\n */\n cfg?: LooseObject;\n}\n\n/**\n * @title geometry.label({}) 配置属性\n */\nexport interface GeometryLabelCfg {\n /**\n * @title 类型\n * @description 用于声明渲染的 label 类型。当用户使用了自定义的 label 类型,需要声明具体的 type 类型,否则会使用默认的 label 类型渲染。\n */\n type?: string;\n /**\n * @title 相对数据点的偏移距离, polar 和 theta 坐标系下可使用百分比字符串。\n */\n offset?: number | string;\n /**\n * @title label 相对于数据点在 X 方向的偏移距离。\n */\n offsetX?: number;\n /**\n * @title label 相对于数据点在 Y 方向的偏移距离。\n */\n offsetY?: number;\n /**\n * @title 文本内容\n * @description 展示的文本内容,如果不声明则按照参与映射的第一字段的值进行显示。当 content 为 IGroup 或者 IShape 类型时,请使用相对定位,即 x 和 y 坐标都设为 0,G2 内部会整体做最后的 label 进行定位的。\n * @link 示例: https://g2.antv.vision/zh/examples/pie/basic#pie-custome-label\n */\n content?: string | IGroup | IShape | GeometryLabelContentCallback;\n /**\n * @title 文本样式\n * @description label 文本图形属性样式。\n */\n style?: LooseObject;\n /**\n * @title 是否自动旋转\n * @description label 是否自动旋转\n * @default true\n */\n autoRotate?: boolean;\n /**\n * @title 旋转\n * @description 当且仅当 `autoRotate` 为 false 时生效,用于设置文本的旋转角度,**弧度制**。\n */\n rotate?: number;\n /**\n * @title 标签高度\n * @description 标签高度设置,仅当标签类型 type 为 pie 时生效;也可在主题中设置 pieLabels.labelHeight\n */\n labelHeight?: number;\n /**\n * @title 文本连接线\n * @description 用于设置文本连接线的样式属性,null 表示不展示。\n */\n labelLine?: null | boolean | { style?: object };\n /**\n * @title 文本放射状\n * @description 只对极坐标下的文本生效,表示文本是否按照角度进行放射状显示,true 表示开启,false 表示关闭。\n */\n labelEmit?: boolean;\n /**\n * @title 文本布局\n * 文本布局类型,支持多种布局函数组合使用。\n *\n * 目前提供了三种:'overlap','fixedOverlap','limitInShape':\n * 1. overlap: label 防遮挡,为了防止 label 之间相互覆盖,通过尝试向**四周偏移**来剔除放不下的 label。\n * 2. fixed-overlap: 不改变 label 位置的情况下对相互重叠的 label 进行调整。\n * 3. limit-in-shape: 剔除 shape 容纳不了的 label。\n *\n * @example\n * ```ts\n * layout: {\n * type: 'overlap',\n * },\n * ```\n */\n layout?: GeometryLabelLayoutCfg | GeometryLabelLayoutCfg[];\n /**\n * @title 背景\n * @description 用于绘制 label 背景\n */\n background?: {\n /**\n * @title 背景框图形属性配置\n * - fill?: string; 背景框 填充色\n * - stroke?: string; 背景框 描边色\n * - lineWidth?: string; 背景框 描边宽度\n * - radius?: number | number[]; 背景框圆角,支持整数或数组形式\n */\n style?: ShapeAttrs;\n /**\n * @title 背景框 内边距\n */\n padding?: number | number[];\n };\n /**\n * @title 位置\n * @description 仅当 geometry 为 interval 时生效,指定当前 label 与当前图形的相对位置。\n */\n position?:\n | ((data: Datum, mappingData: MappingDatum, index: number) => IntervalGeometryLabelPosition)\n | IntervalGeometryLabelPosition;\n /**\n * @title 动画配置。\n */\n animate?: AnimateOption | false | null;\n}\n\n/**\n * @title `geometry().label({})` 配置定义\n */\nexport interface LabelOption {\n /**\n * @title 映射的字段。\n */\n fields?: string[];\n /**\n * @title 回调函数。\n */\n callback?: LabelCallback;\n cfg?: GeometryLabelCfg;\n}\n\n/**\n * @title Geometry 下每个 state 的配置结构\n */\nexport interface StateCfg {\n /**\n * @title 状态样式配置。\n */\n style?: object | StateStyleCallback;\n}\n\n/**\n * @title geometry.state({}) 配置定义\n */\nexport interface StateOption {\n /**\n * @title 默认状态样式。\n */\n default?: StateCfg;\n /**\n * @title active 状态配置。\n */\n active?: StateCfg;\n /**\n * @title inactive 状态配置。\n */\n inactive?: StateCfg;\n /**\n * @title selected 状态配置。\n */\n selected?: StateCfg;\n}\n\n/**\n * @title interval label 的位置\n */\nexport type IntervalGeometryLabelPosition = 'top' | 'bottom' | 'middle' | 'left' | 'right';\n/**\n * @title G2 提供的 adjust 类型\n */\nexport type AdjustType = 'stack' | 'jitter' | 'dodge' | 'symmetric';\n/**\n * @title geometry.color() 图形属性回调函数定义\n */\nexport type ColorAttrCallback = (...args) => string;\n/**\n * @title geometry.shape() 图形属性回调函数定义\n */\nexport type ShapeAttrCallback = (...args) => string | any[];\n/**\n * @title geometry.size() 图形属性回调函数定义\n */\nexport type SizeAttrCallback = (...args) => number;\n/**\n * @title geometry.tooltip() 接口回调函数定义\n */\nexport type TooltipCallback = (...args) => LooseObject;\n/**\n * @title geometry.style() 接口回调函数定义\n */\nexport type StyleCallback = (...args) => LooseObject;\n/**\n * @title geometry.label() 接口回调函数定义\n */\nexport type LabelCallback = (...args) => GeometryLabelCfg | null | undefined;\n/**\n * @title geometry label 中 content 属性的回调函数类型定义\n */\nexport type GeometryLabelContentCallback = (\n data: Datum,\n mappingData: MappingDatum,\n index: number\n) => string | IShape | IGroup;\n/**\n * @title state 下 style 回调函数定义\n */\nexport type StateStyleCallback = (element: Element) => LooseObject;\n\n// ============================ Geometry Shape 接口相关的类型定义 ============================\n/**\n * @title 获取 shape marker 时需要的信息\n */\nexport interface ShapeMarkerCfg {\n /**\n * @title 颜色。\n */\n color: string;\n /**\n * @title 是否是极坐标。\n */\n isInPolar: boolean;\n}\n\n/**\n * @title 图形 marker 的配置信息。\n */\nexport interface ShapeMarkerAttrs {\n /**\n * @title marker 的形状。\n */\n symbol: string | ShapeMarkerSymbol;\n /**\n * @title marker 样式\n * @description\n * marker 的样式,`ShapeAttrs` 属性结构如下:\n *\n * ```ts\n * {\n * // x 坐标\n * x?: number;\n * // y 坐标\n * y?: number;\n * // 圆半径\n * r?: number;\n * // 描边颜色\n * stroke?: string | null;\n * // 描边透明度\n * strokeOpacity?: number;\n * // 填充颜色\n * fill?: string | null;\n * // 填充透明度\n * fillOpacity?: number;\n * // 整体透明度\n * opacity?: number;\n * // 线宽\n * lineWidth?: number;\n * // 指定如何绘制每一条线段末端\n * lineCap?: 'butt' | 'round' | 'square';\n * // 用来设置2个长度不为0的相连部分(线段,圆弧,曲线)如何连接在一起的属性(长度为0的变形部分,其指定的末端和控制点在同一位置,会被忽略)\n * lineJoin?: 'bevel' | 'round' | 'miter';\n * // 设置线的虚线样式,可以指定一个数组。一组描述交替绘制线段和间距(坐标空间单位)长度的数字。 如果数组元素的数量是奇数,数组的元素会被复制并重复。例如, [5, 15, 25] 会变成 [5, 15, 25, 5, 15, 25]。这个属性取决于浏览器是否支持 setLineDash() 函数。\n * lineDash?: number[] | null;\n * // Path 路径\n * path?: string | object[];\n * // 图形坐标点\n * points?: object[];\n * // 宽度\n * width?: number;\n * // 高度\n * height?: number;\n * // 阴影模糊效果程度\n * shadowBlur?: number;\n * // 阴影颜色\n * shadowColor?: string | null;\n * // 阴影 x 方向偏移量\n * shadowOffsetX?: number;\n * // 阴影 y 方向偏移量\n * shadowOffsetY?: number;\n * // 设置文本内容的当前对齐方式\n * textAlign?: 'start' | 'center' | 'end' | 'left' | 'right';\n * // 设置在绘制文本时使用的当前文本基线\n * textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';\n * // 字体样式\n * fontStyle?: 'normal' | 'italic' | 'oblique';\n * // 文本字体大小\n * fontSize?: number;\n * // 文本字体\n * fontFamily?: string;\n * // 文本粗细\n * fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number;\n * // 字体变体\n * fontVariant?: 'normal' | 'small-caps' | string;\n * // 文本行高\n * lineHeight?: number;\n * [key: string]: any;\n * }\n * ```\n *\n * @link https://github.com/antvis/g/blob/28e3178b616573e0fa6d59694f1aaca2baaa9766/packages/g-base/src/types.ts#L37|ShapeAttrs\n */\n style: ShapeAttrs;\n}\n\n/**\n * @title shape 关键点信息\n */\nexport interface ShapePoint {\n /**\n * @title 数据点映射后对应 x 的值。\n */\n readonly x: number | number[];\n /**\n * @title 数据点映射后对应 y 的值。\n */\n readonly y?: number | number[];\n /**\n * @title 数据在 y 方向的最小值。\n */\n readonly y0?: number;\n /**\n * @title 大小\n */\n size?: number;\n}\n\n/**\n * @title 小提琴图 shape 关键点信息\n */\nexport type ViolinShapePoint = ShapePoint & { _size?: number[] };\n\n/**\n * @title 注册 ShapeFactory 需要实现的接口。\n */\nexport interface RegisterShapeFactory {\n /**\n * @title 默认的 shape 类型。\n */\n readonly defaultShapeType: string;\n /**\n * @title 返回绘制 shape 所有的关键点集合。\n */\n readonly getDefaultPoints?: (pointInfo: ShapePoint) => Point[];\n /**\n * @title 获取 shape 的默认绘制样式\n */\n readonly getDefaultStyle?: (geometryTheme: LooseObject) => LooseObject;\n /**\n * @title 获取 shape 对应的缩略图配置。\n */\n readonly getMarker?: (shapeType: string, markerCfg: ShapeMarkerCfg) => ShapeMarkerAttrs;\n /**\n * @title 创建具体的 G.Shape 实例。\n */\n readonly drawShape?: (shapeType: string, cfg: ShapeInfo, container: IGroup) => IShape | IGroup;\n}\n\n/**\n * @title 注册具体 shape 需要实现的接口。\n */\nexport interface RegisterShape {\n /**\n * @title 计算绘制需要的关键点,在注册具体的 shape 时由开发者自己定义。\n */\n readonly getPoints?: (pointInfo: ShapePoint) => Point[];\n /**\n * @title 获取 shape 对应的缩略图样式配置,在注册具体的 shape 时由开发者自己定义。\n */\n readonly getMarker?: (markerCfg: ShapeMarkerCfg) => ShapeMarkerAttrs;\n /**\n * @title 绘制函数。\n */\n readonly draw: (cfg: ShapeInfo, container: IGroup) => IShape | IGroup | void;\n}\n\n/**\n * @title Shape 接口定义。\n */\nexport interface Shape extends RegisterShape {\n /**\n * @title 坐标系对象。\n */\n coordinate: Coordinate;\n /**\n * @title 工具函数,将 0~1 path 转化成实际画布 path。\n */\n parsePath: (path: any) => PathCommand[];\n /**\n * @title 工具函数,0~1 的坐标点转换成实际画布坐标点。\n */\n parsePoint: (point: Point) => Point;\n /**\n * @title 工具函数,0~1 的坐标点集合转换成实际画布坐标点集合。\n */\n parsePoints: (points: Point[]) => Point[];\n}\n\n/**\n * @title ShapeFactory 接口定义。\n */\nexport interface ShapeFactory extends RegisterShapeFactory {\n /**\n * @title 工厂名。\n */\n geometryType: string;\n /**\n * @title 坐标系对象。\n */\n coordinate: Coordinate;\n /**\n * @title ShapeFactory 下所有的主题样式。\n */\n theme: LooseObject;\n /**\n * @title 根据名称获取具体的 shape 对象。\n */\n getShape: (shapeType: string | string[]) => Shape;\n /**\n * @title 获取构成 shape 的关键点。\n */\n getShapePoints: (shapeType: string | string[], pointInfo: ShapePoint) => Point[];\n}\n\n/**\n * @title 自定义 Shape marker 的函数\n */\nexport type ShapeMarkerSymbol = (x: number, y: number, r: number) => PathCommand[];\n\n// ============================ Annotation 类型定义 ============================\n/**\n * @title Annotation position 回调函数\n */\nexport type AnnotationPositionCallback = (\n xScales: Scale[] | Record<string, Scale>,\n yScales: Scale[] | Record<string, Scale>\n) => [number | string, number | string];\n/**\n * @title Annotation 位置相关属性的类型定义\n */\nexport type AnnotationPosition =\n | [number | string, number | string]\n | Record<string, number | string>\n | AnnotationPositionCallback;\n\n/**\n * @title Annotation 定义的通用属性,chart.annotation().line({})\n */\nexport interface AnnotationBaseOption {\n /**\n * @title 类型\n */\n readonly type?: string;\n /**\n * @title 是否顶层\n * @description 指定 annotation 是否绘制在 canvas 最上层,默认为 false, 即绘制在最下层\n */\n readonly top?: boolean;\n /**\n * @title 是否进行动画\n */\n readonly animate?: boolean;\n /**\n * @title 动画参数配置\n * @description 当且仅当 `animate` 属性为 true,即动画开启时生效。\n */\n readonly animateOption?: ComponentAnimateOption;\n /**\n * @title x 方向的偏移量\n */\n readonly offsetX?: number;\n /**\n * @title y 方向的偏移量\n */\n readonly offsetY?: number;\n}\n\n/**\n * @title 使用 RegionPosition 定位的组件配置\n */\nexport interface RegionPositionBaseOption extends AnnotationBaseOption {\n /**\n * @title 起始位置\n */\n readonly start: AnnotationPosition;\n /**\n * @title 结束位置\n */\n readonly end: AnnotationPosition;\n /**\n * @title 图形样式属性\n */\n readonly style?: ShapeAttrs;\n}\n\n/**\n * @title 使用 PointPosition 定位的组件配置\n */\nexport interface PointPositionBaseOption extends AnnotationBaseOption {\n /**\n * @title Point 定位位置\n */\n readonly position: AnnotationPosition;\n}\n\n/**\n * @title 使用 Image Annotation 组件的配置定义\n */\nexport interface ImageOption extends RegionPositionBaseOption {\n /**\n * @title 图片路径\n */\n readonly src: string;\n}\n\n/**\n * @title 使用 Line Annotation 组件的配置定义\n */\nexport interface LineOption extends RegionPositionBaseOption {\n /**\n * @title 文本配置定义\n */\n readonly text?: LineAnnotationTextCfg;\n}\n/**\n * @title 使用 Arc Annotation 组件的配置定义\n */\nexport type ArcOption = RegionPositionBaseOption;\n/**\n * @title 使用 Region Annotation 组件的配置定义\n */\nexport type RegionOption = RegionPositionBaseOption;\n/**\n * @title 使用 Text Annotation 组件的配置定义\n */\nexport interface TextOption extends PointPositionBaseOption, Omit<EnhancedTextCfg, 'content'> {\n content?: string | number | ((filteredData: object[]) => string | number);\n}\n/**\n * @title 使用 DataMarker Annotation 组件的配置定义\n */\nexport interface DataMarkerOption extends PointPositionBaseOption {\n /**\n * @title point 设置\n */\n readonly point?: null | { style?: ShapeAttrs };\n /**\n * @title line 设置\n */\n readonly line?: null | { style?: ShapeAttrs; length?: number };\n /**\n * @title text 设置\n */\n readonly text: null | EnhancedTextCfg;\n /**\n * @title 文本超出绘制区域时,是否自动调节文本方向,默认为 true\n */\n readonly autoAdjust?: boolean;\n /**\n * @title 朝向,默认为 upward,可选值为 'upward' 或者 'downward'\n */\n readonly direction?: 'upward' | 'downward';\n}\n/**\n * @title 使用 DataRegion Annotation 组件的配置定义\n */\nexport interface DataRegionOption extends RegionPositionBaseOption {\n /**\n * @title line长度,default为 0\n */\n readonly lineLength?: number;\n /**\n * @title 标注区间的配置\n */\n readonly region?: null | { style?: ShapeAttrs };\n /**\n * @title 文本的配置\n */\n readonly text?: null | EnhancedTextCfg;\n}\n/**\n * @title 使用 RegionFilter Annotation 组件的配置定义\n */\nexport interface RegionFilterOption extends RegionPositionBaseOption {\n /**\n * @title 染色色值\n */\n readonly color: string;\n /**\n * @title 适用场景\n * @description 可选,设定regionFilter只对特定geom类型起作用,如apply:['area']\n */\n readonly apply?: string[];\n}\n\n/**\n * @title Shape Annotation 的配置\n */\nexport interface ShapeAnnotationOption extends AnnotationBaseOption {\n /**\n * @title 自定义 Annotation 绘制函数\n */\n render: (\n container: IGroup,\n view: View,\n helpers: { parsePosition: (position: [string | number, string | number] | Datum) => Point }\n ) => void;\n}\n\n/**\n * Html Annotation 配置\n */\nexport interface HtmlAnnotationOption extends PointPositionBaseOption {\n /**\n * @title 容器元素\n */\n container?: string | HTMLElement;\n /**\n * @title 自定义 HTML DOM 元素\n */\n html: string | HTMLElement | ((container: HTMLElement, view: View) => void | string | HTMLElement);\n /**\n * @title X 方向对齐\n */\n alignX?: 'left' | 'middle' | 'right';\n /**\n * @title Y 方向对齐\n */\n alignY?: 'top' | 'middle' | 'bottom';\n /**\n * @title X 方向偏移\n */\n offsetX?: number;\n /**\n * @title Y 方向偏移\n */\n offsetY?: number;\n}\n\n// ============================ Chart && View 上的类型定义 ============================\n/**\n * @title Tooltip 内容框的 css 样式定义\n */\nexport interface TooltipDomStyles {\n 'g2-tooltip'?: LooseObject;\n 'g2-tooltip-title'?: LooseObject;\n 'g2-tooltip-list'?: LooseObject;\n 'g2-tooltip-list-item'?: LooseObject;\n 'g2-tooltip-marker'?: LooseObject;\n 'g2-tooltip-value'?: LooseObject;\n 'g2-tooltip-name'?: LooseObject;\n}\n\n/**\n * @title 目前组件动画允许的参数配置\n */\nexport interface ComponentAnimateCfg {\n /**\n * @title 动画执行时间\n */\n readonly duration?: number;\n /**\n * @title 动画缓动函数\n */\n readonly easing?: string;\n /**\n * @title 动画延迟时间\n */\n readonly delay?: number;\n}\n/**\n * @title 组件各个动画类型配置\n */\nexport interface ComponentAnimateOption {\n /**\n * @title 初入场动画配置\n */\n appear?: ComponentAnimateCfg;\n /**\n * @title 更新动画配置\n */\n update?: ComponentAnimateCfg;\n /**\n * @title 更新后新入场的动画配置\n */\n enter?: ComponentAnimateCfg;\n /**\n * @title 离场动画配置\n */\n leave?: ComponentAnimateCfg;\n}\n\n/**\n * @title 列定义配置项\n */\nexport interface ScaleOption extends ScaleConfig {\n /**\n * @title 声明度量类型。\n */\n type?: ScaleType;\n /**\n * @title 同步 scale\n *\n * @example\n * ```ts\n * chart.scale({\n * x: { sync: true },\n * y: { sync: true },\n * x1: { sync: 'x1' },\n * x2: { sync: 'x1' },\n * });\n * ```\n *\n * 通过以上配置,我们会分别对 x 和 y 两个字段,x1 和 x2 两个字段进行同步度量操作。\n */\n sync?: boolean | string;\n /**\n * @title 是否显示最后日期\n * @description 只对 type: 'time' 的 scale 生效,强制显示最后的日期 tick。\n */\n showLast?: boolean;\n /**\n * @title 唯一 ID\n * @description\n * 用于声明使用数据记录中的哪些字段来组成一条数据的唯一 id(如有多个字段,则使用 '-' 连接)。\n * 数据 id 用于标识 Element 图形元素,应用于 Geometry 中的图形元素 Element 更新。\n * 默认 G2 内部会有一套 ID 生成规则,如果不能满足用户需求,用户既可以使用该属性配置 id。\n * @example\n * 下面的例子中,声明了将 'x' 和 'y' 字段的数值来作为每条数据记录的 id,即下面数据两条数据的 id 分别为:'1-23' 和 '2-2'。\n * ```ts\n * const data = [\n * { x: 1, y: 23, z: 'a' },\n * { x: 2, y: 2, z: 'b' },\n * ];\n *\n * chart.scale({\n * x: { key: true },\n * y: { key: true },\n * });\n * ```\n */\n key?: boolean;\n}\n\n/**\n * @title Geometry 动画参数配置。geometry.animate()\n */\nexport interface AnimateOption {\n /**\n * @title chart 初始化渲染时的入场动画,false/null 表示关闭入场动画。\n */\n appear?: AnimateCfg | false | null;\n /**\n * @title chart 发生更新时,新增元素的入场动画,false/null 表示关闭入场动画。\n */\n enter?: AnimateCfg | false | null;\n /**\n * @title 更新动画配置,false/null 表示关闭更新动画。\n */\n update?: AnimateCfg | false | null;\n /**\n * @title 销毁动画配置,false/null 表示关闭销毁动画。\n */\n leave?: AnimateCfg | false | null;\n}\n\n/**\n * @title 用于配置项式声明交互行为\n */\nexport interface InteractionOption {\n /**\n * @title 交互名称\n */\n type: string;\n /**\n * @title 交互配置\n */\n cfg?: LooseObject;\n}\n\n/**\n * @title 用于配置项式的 Geometry 创建方式\n */\nexport interface GeometryOption {\n /**\n * @title Geometry 的类型。\n */\n type?: 'interval' | 'line' | 'path' | 'point' | 'area' | 'polygon' | 'schema' | 'edge' | 'heatmap' | string;\n /**\n * @title position 通道映射规则,对应 `geometry.position()`。\n */\n position?: string | AttributeOption;\n /**\n * @title color 通道映射规则,对应 `geometry.color()`。\n */\n color?: string | AttributeOption;\n /**\n * @title shape 通道映射规则,对应 `geometry.shape()`。\n */\n shape?: string | AttributeOption;\n /**\n * @title size 通道映射规则,对应 `geometry.size()`。\n */\n size?: number | string | AttributeOption;\n /**\n * @title adjust 数据调整方式,对应 `geometry.adjust()`。\n */\n adjust?: string | string[] | AdjustOption | AdjustOption[];\n /**\n * @title style 样式配置,对应 `geometry.size()`。\n */\n style?: StyleOption | LooseObject;\n /**\n * @title tooltip 配置,对应 `geometry.tooltip()`。\n */\n tooltip?: GeometryTooltipOption | boolean | string;\n /**\n * @title Geometry 动画配置,对应 `geometry.animate()`。\n */\n animate?: AnimateOption | boolean;\n /**\n * @title Label 配置,对应 `geometry.label()`。\n */\n label?: LabelOption | false | string;\n /**\n * @title state 样式配置,对应 `geometry.state()`。\n */\n state?: StateOption;\n /**\n * @title 其他配置\n */\n cfg?: {\n /**\n * @title 是否对数据进行排序\n */\n sortable?: boolean;\n /**\n * @title 是否可见\n */\n visible?: boolean;\n /**\n * @title 是否连接空值,仅对 'line', 'area' 和 'path' 生效\n */\n connectNulls?: boolean;\n };\n}\n\n/**\n * @title 用于配置型式的 View 声明方式\n */\nexport interface ViewOption {\n /**\n * @title view 的唯一表示 ID\n */\n readonly id?: string;\n /**\n * @title view 的绘制范围,起始点为左上角。\n */\n readonly region?: Region;\n /**\n * 设置图表的内边距,使用方式参考 CSS 盒模型。\n * 下图黄色区域即为 padding 的范围。\n * \n *\n * @example\n * 1. padding: 20\n * 2. padding: [ 10, 30, 30 ]\n */\n readonly padding?: ViewPadding;\n /**\n * @title 设置主题。\n */\n readonly theme?: LooseObject | string;\n /**\n * @title 是否可见。\n */\n readonly visible?: boolean;\n /**\n * 图表组件、图形映射等相关的配置。\n */\n readonly options?: Options;\n}\n\n/**\n * @title Chart 构造方法的入参\n */\nexport interface ChartCfg\n extends Omit<ViewCfg, 'parent' | 'canvas' | 'foregroundGroup' | 'middleGroup' | 'backgroundGroup' | 'region'> {\n /**\n * @title 指定 chart 绘制的 DOM,可以传入 DOM id,也可以直接传入 dom 实例。\n */\n readonly container: string | HTMLElement;\n /**\n * @title 图表宽度。\n */\n readonly width?: number;\n /**\n * @title 图表高度。\n */\n readonly height?: number;\n /**\n * @title 否自适应容器宽高\n * @description\n * 图表是否自适应容器宽高,默认为 false,用户需要手动设置 width 和 height。当 `autoFit: true` 时,\n * 会自动取图表容器的宽高,如果用户设置了 height,那么会以用户设置的 height 为准。\n * @default false\n */\n readonly autoFit?: boolean;\n /**\n * @title 渲染引擎\n * @default \"canvas\"\n */\n readonly renderer?: Renderer;\n /**\n * @title 像素比\n * @description 设置设备像素比,默认取浏览器的值 `window.devicePixelRatio`。\n */\n readonly pixelRatio?: number;\n /**\n * @title 是否开启局部刷新\n * @default true\n */\n readonly localRefresh?: boolean;\n /**\n * @title 是否支持 CSS transform\n * @description 开启后图表的交互以及事件将在页面设置了 css transform 属性时生效,默认关闭。\n * @default false\n */\n readonly supportCSSTransform?: boolean;\n /**\n * @title 配置图表默认交互,仅支持字符串形式。\n */\n readonly defaultInteractions?: string[];\n}\n\nexport type SyncViewPaddingFn = (chart: View, views: View[], PC: PaddingCalCtor) => void;\n\n/**\n * @title View 构造参数\n */\nexport interface ViewCfg {\n /**\n * @title View id,可以由外部传入\n */\n readonly id?: string;\n /**\n * @title 当前 view 的父级 view。\n */\n readonly parent: View;\n /**\n * @title canvas 实例。\n */\n readonly canvas: ICanvas;\n /**\n * @title 前景层\n */\n readonly foregroundGroup: IGroup;\n /**\n * @title 中间层\n */\n readonly middleGroup: IGroup;\n /**\n * @title 背景层\n */\n readonly backgroundGroup: IGroup;\n /**\n * @title view 的绘制范围\n */\n readonly region?: Region;\n /**\n * @title 是否对超出坐标系范围的 Geometry 进行剪切\n */\n readonly limitInPlot?: boolean;\n /**\n * @title 内边距\n * @description 设置图表的内边距,使用方式参考 CSS 盒模型,下图黄色区域即为 padding 的范围。\n * @see \n * @example\n * 1. padding: 20\n * 2. padding: [ 10, 30, 30 ]\n */\n readonly padding?: ViewPadding;\n /**\n * @title 额外边距\n * @description 设置图表的内边距在padding的基础上增加appendPadding的调整。\n * @example\n * 1. padding: 20\n * 2. padding: [ 10, 30, 30 ]\n */\n readonly appendPadding?: ViewAppendPadding;\n /**\n * @title 是否同步子 view 的 padding\n * @description 是否同步子 view 的 padding,可以是 boolean / SyncViewPaddingFn\n * @example\n * view1 的 padding 10\n * view2 的 padding 20\n * 那么两个子 view 的 padding 统一变成最大的 20.\n *\n * 如果是 Funcion,则使用自定义的方式去计算子 view 的 padding,这个函数中去修改所有的 views autoPadding 值\n */\n readonly syncViewPadding?: boolean | SyncViewPaddingFn;\n /**\n * @title 主题\n * @description 设置 view 实例主题\n */\n readonly theme?: LooseObject | string;\n /**\n * @title 图表组件、图形映射等相关的配置。\n */\n readonly options?: Options;\n /**\n * @title 是否可见\n */\n readonly visible?: boolean;\n}\n\n/**\n * @ignore\n * 组件及布局的信息\n */\nexport interface ComponentOption {\n readonly id?: string;\n readonly component: GroupComponent | HtmlComponent;\n readonly layer: LAYER;\n direction: DIRECTION;\n readonly type: COMPONENT_TYPE;\n /* 其他的额外信息 */\n readonly extra?: any;\n}\n\n/**\n * @title Legend marker 的配置结构\n */\nexport interface MarkerCfg extends LegendMarkerCfg {\n /**\n * @title 配置图例 marker 的 symbol 形状。\n */\n symbol?: Marker | MarkerCallback;\n style?: ShapeAttrs | ((style: ShapeAttrs) => ShapeAttrs);\n}\n\n/**\n * @title Legend item 各个图例项的数据结构\n */\nexport interface LegendItem {\n /**\n * 唯一值,用于动画或者查找\n */\n id?: string;\n /**\n * @title 名称\n */\n name: string;\n /**\n * @title 值\n */\n value: any;\n /**\n * @title 图形标记\n */\n marker?: MarkerCfg | ((name: string, index: number, item: { name: string; value: string } & MarkerCfg) => MarkerCfg);\n /**\n * @title 初始是否处于未激活状态\n */\n unchecked?: boolean;\n}\n\nexport interface G2LegendTitleCfg extends LegendTitleCfg {\n /**\n * @title title 文本显示内容\n */\n text?: string;\n}\n\n/**\n * 图例项配置\n */\nexport interface LegendCfg extends Omit<CategoryLegendCfg, 'marker'> {\n /**\n * @title 是否为自定义图例\n * @description 当该属性为 true 时,需要声明 items 属性。\n */\n readonly custom?: boolean;\n /**\n * @title 布局\n * @description 布局方式: horizontal,vertical\n */\n layout?: 'horizontal' | 'vertical';\n /**\n * @title 图例标题配置\n * @description 默认不展示。\n * @example\n * 属性结构如下:\n *\n * ```ts\n * {\n * spacing?: number; // 标题同图例项的间距\n * style?: ShapeAttrs; // 文本样式配置项\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L639|LegendTitleCfg\n */\n title?: G2LegendTitleCfg;\n /**\n * @title 背景框配置项。\n * @example\n * 属性结构如下:\n *\n * ```ts\n * {\n * padding?: number | number[]; // 背景的留白\n * style?: ShapeAttrs; // 背景样式配置项\n * }\n * ```\n *\n * 详见 {@link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L652|LegendBackgroundCfg}\n */\n background?: LegendBackgroundCfg;\n /**\n * @title 图例的位置。\n */\n position?:\n | 'top'\n | 'top-left'\n | 'top-right'\n | 'right'\n | 'right-top'\n | 'right-bottom'\n | 'left'\n | 'left-top'\n | 'left-bottom'\n | 'bottom'\n | 'bottom-left'\n | 'bottom-right';\n /**\n * @title 动画开关,默认关闭。\n */\n animate?: boolean;\n /**\n * @title 动画\n * @description 动画参数配置,当且仅当 `animate` 属性为 true,即动画开启时生效。\n */\n animateOption?: ComponentAnimateOption;\n /**\n * @title 水平间距\n * @description **分类图例适用**,控制图例项水平方向的间距。\n */\n itemSpacing?: number;\n /**\n * @title 垂直间距\n * @description **分类图例适用**,控制图例项垂直方向的间距。\n */\n itemMarginBottom?: number;\n /**\n * @title 图例项的最大宽度\n * @description\n * **分类图例适用**,图例项的最大宽度,超出则自动缩略。\n * `maxItemWidth` 可以是像素值;\n * 也可以是相对值(取 0 到 1 范围的数值),代表占图表宽度的多少\n */\n maxItemWidth?: number;\n /**\n * @title 图例项的宽度\n * @description **分类图例适用**,图例项的宽度, 默认为 null,自动计算。\n */\n itemWidth?: number;\n /**\n * @title 图例项的高度\n * @description **分类图例适用**,图例的高度,默认为 null。\n */\n itemHeight?: number;\n /**\n * @title 图例项 name\n * @description\n * **分类图例适用**,图例项 name 文本的配置。\n * 属性结构如下:\n *\n * ```ts\n * {\n * spacing?: number; // 图例项 name 同后面 value 的间距\n * formatter?: (text: string, item: ListItem, index: number) => any; // 格式化文本函数\n * style?: ShapeAttrs; // 文本配置项\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L665|LegendItemNameCfg\n */\n itemName?: LegendItemNameCfg;\n /**\n * @title 图例项 value\n * @description\n * **分类图例适用**,图例项 value 附加值的配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * alignRight?: boolean; // 是否右对齐,默认为 false,仅当设置图例项宽度时生效\n * formatter?: (text: string, item: ListItem, index: number) => any; // 格式化文本函数\n * style?: ShapeAttrs; // 图例项附加值的配置\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L685|LegendItemValueCfg\n */\n itemValue?: LegendItemValueCfg;\n /**\n * @title 最大宽度\n * @description **分类图例适用**,图例项最大宽度设置。\n */\n maxWidth?: number;\n /**\n * @title 最大高度\n * @description **分类图例适用**,图例项最大高度设置。\n */\n maxHeight?: number;\n /**\n * @title 最大宽度比例\n * @description **分类图例适用**,图例项最大宽度比例(以 view 的 bbox 宽度为参照,默认 0.25)。\n */\n maxWidthRatio?: number;\n /**\n * @title 最大高度比例\n * @description **分类图例适用**,图例项最大高度比例(以 view 的 bbox 高度为参照,默认 0.25)。\n */\n maxHeightRatio?: number;\n /**\n * @title 图例项的 marker\n * @description **分类图例适用**,图例项的 marker 图标的配置。\n */\n marker?: MarkerCfg | ((name: string, index: number, item: { name: string; value: string } & MarkerCfg) => MarkerCfg);\n /**\n * @title 是否进行分页\n * @description **适用于分类图例**,当图例项过多时是否进行分页。\n */\n flipPage?: boolean;\n /**\n * @title 分页器的样式\n * @description **适用于分类图例**,图例分页器的样式设置。\n */\n pageNavigator?: LegendPageNavigatorCfg;\n /**\n * @title 图例项\n * @description **分类图例适用**,用户自己配置图例项的内容。\n */\n items?: LegendItem[];\n /**\n * @title 反选\n * @description **分类图里适用**,用来配置正反选功能\n */\n radio?: LegendRadio;\n /**\n * @title 是否逆序\n * @description **分类图例适用**,是否将图例项逆序展示。\n */\n reversed?: boolean;\n\n /**\n * @title 最小值\n * @description **连续图例适用**,选择范围的最小值。\n */\n min?: number;\n /**\n * @title 最大\n * @description **连续图例适用**,选择范围的最大值。\n */\n max?: number;\n /**\n * @title value\n * @description **连续图例适用**,选择的值。\n */\n value?: number[];\n /**\n * @title 色块样式\n * @description\n * **连续图例适用**,选择范围的色块样式配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 选定范围的样式\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L574|ContinueLegendTrackCfg\n */\n track?: ContinueLegendTrackCfg;\n /**\n * @title 滑轨(背景\n * @description\n * **连续图例适用**,图例滑轨(背景)的样式配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * type?: string; // rail 的类型,color, size\n * size?: number; // 滑轨的宽度\n * defaultLength?: number; // 滑轨的默认长度,,当限制了 maxWidth,maxHeight 时,不会使用这个属性会自动计算长度\n * style?: ShapeAttrs; // 滑轨的样式\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L595|ContinueLegendRailCfg\n */\n rail?: ContinueLegendRailCfg;\n /**\n * @title 文本\n * @description\n * **连续图例适用**,文本的配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * // 文本同滑轨的对齐方式,有五种类型\n * // rail : 同滑轨对齐,在滑轨的两端\n * // top, bottom: 图例水平布局时有效\n * // left, right: 图例垂直布局时有效\n * align?: string;\n * spacing?: number; // 文本同滑轨的距离\n * style?: ShapeAttrs; // 文本样式\n * }\n * ```\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L618|ContinueLegendLabelCfg\n */\n label?: ContinueLegendLabelCfg;\n /**\n * @title 滑块\n * @description\n * **连续图例适用**,滑块的配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * size?: number; // 滑块的大小\n * style?: ShapeAttrs; // 滑块的样式设置\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L582|ContinueLegendTrackCfg\n */\n handler?: ContinueLegendHandlerCfg;\n /**\n * @title 是否可滑动\n * @description **连续图例适用**,滑块是否可以滑动。\n */\n slidable?: boolean;\n /**\n * @title 图例 x 方向的偏移。\n */\n offsetX?: number;\n /**\n * @title 图例 y 方向的偏移。\n */\n offsetY?: number;\n /**\n * @title 图例在四个方向的偏移量\n */\n padding?: number[];\n /**\n * 图例高亮状态,false 表示默认置灰,无或 true 表示高亮\n */\n selected?: {\n [key: string]: boolean;\n };\n}\n\n/**\n * Tooltip Crosshairs 的文本数据结构。\n */\nexport interface TooltipCrosshairsText extends CrosshairTextCfg {\n /**\n * @title crosshairs 文本内容\n */\n content?: string;\n}\n\n/**\n * 辅助线文本回调函数\n * @param type 对应当前 crosshairs 的类型,值为 'x' 或者 'y'\n * @param defaultContent 对应当前 crosshairs 默认的文本内容\n * @param items 对应当前 tooltip 内容框中的数据\n * @param currentPoint 对应当前坐标点\n * @returns 返回当前 crosshairs 对应的辅助线文本配置\n */\nexport type TooltipCrosshairsTextCallback = (\n type: string,\n defaultContent: any,\n items: any[],\n currentPoint: Point\n) => TooltipCrosshairsText;\n/**\n * @title Tooltip crosshairs 配置结构\n */\nexport interface TooltipCrosshairs {\n /**\n * @title 类型\n * @description\n * crosshairs 的类型: `x` 表示 x 轴上的辅助线,`y` 表示 y 轴上的辅助项。\n * 以下是在不同坐标系下,crosshairs 各个类型的表现:\n *\n * | 坐标系 | type = 'x' | type = 'xy' | type = 'y' |\n * | ------------ | ------------- | ------------- |\n * | 直角坐标系 |  |  |  |\n * | 极坐标 |  |  |  |\n */\n type?: 'x' | 'y' | 'xy';\n /**\n * @title 辅助线的样式配置。\n * @description\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 线的样式配置\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L1177|CrosshairLineCfg\n */\n line?: CrosshairLineCfg;\n /**\n * @title 文本\n * @description 辅助线文本配置,支持回调。\n */\n text?: TooltipCrosshairsText | TooltipCrosshairsTextCallback;\n /**\n * @title 辅助线文本背景配置。\n * @description\n * 属性结构如下:\n *\n * ```ts\n * {\n * padding?: number | number[]; // 文本背景周围的留白\n * style?: ShapeAttrs; // 文本背景的样式\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L1185|CrosshairTextBackgroundCfg\n */\n textBackground?: CrosshairTextBackgroundCfg;\n /**\n * @title 辅助线是否跟随鼠标移动\n * @description 即定位到数据点\n * @default false\n */\n follow?: boolean;\n}\n\nexport type TooltipTitle = string | ((title: string, datum: Datum) => string);\n\nexport type TooltipItem = {\n /**\n * @title 原始数据\n */\n readonly data: Datum; // 原始数据\n /**\n * @title 映射之后的数据\n */\n readonly mappingData: Datum; // 映射后的数据\n /**\n * @title tooltip item 中名称\n */\n readonly name: string;\n /**\n * @title tooltip item 中值\n */\n readonly value: string | number;\n /**\n * @title tooltip item 中颜色\n */\n readonly color: string;\n /**\n * @title tooltip item 中图标类型\n */\n readonly marker: string;\n};\n\n/**\n * @title chart.tooltip() 接口配置属性\n */\nexport interface TooltipCfg {\n /**\n * @title 设置 tooltip 内容框是否跟随鼠标移动。\n * @description 默认为 true,跟随鼠标移动,false 则固定位置不随鼠标移动。\n * @default true\n */\n follow?: boolean;\n /**\n * @title tooltip 是否允许鼠标滑入\n * @default false\n */\n enterable?: boolean;\n /**\n * @title tooltip 显示延迟(ms)\n * @description 默认为 16ms,建议在 enterable = true 的时候才设置\n * @default \"16ms\"\n */\n showDelay?: number;\n /**\n * @title 是否展示 tooltip 标题。\n */\n showTitle?: boolean;\n /**\n * @title 标题\n * @description\n * 设置 tooltip 的标题内容:如果值为数据字段名,则会展示数据中对应该字段的数值,如果数据中不存在该字段,则直接展示 title 值。\n * 同时支持传入方法,回调的方式返回字符串\n */\n title?: TooltipTitle;\n /**\n * @title 设置 tooltip 的固定展示位置,相对于数据点。\n */\n position?: 'top' | 'bottom' | 'left' | 'right';\n /**\n * @title 是否合并当前点对应的所有数据\n * @description true 表示合并当前点对应的所有数据并展示,false 表示只展示离当前点最逼近的数据内容。\n */\n shared?: boolean; // 是否只展示单条数据\n /**\n * @title 是否展示 crosshairs。\n */\n showCrosshairs?: boolean;\n /**\n * @title 交叉线\n * @description 配置 tooltip 的 crosshairs,当且仅当 `showCrosshairs` 为 true 时生效。\n */\n crosshairs?: TooltipCrosshairs;\n /**\n * @title 是否渲染 tooltipMarkers。\n */\n showMarkers?: boolean;\n /**\n * @title tooltipMarker 的样式配置。\n */\n marker?: object;\n /**\n * @title 是否展示 tooltip 内容框\n */\n showContent?: boolean | ((datum: Datum) => boolean);\n /**\n * @title 自定义 tooltip 的容器。\n */\n container?: string | HTMLElement;\n /**\n * @title 图例容器的模板\n * @description 用于指定图例容器的模板,自定义模板时必须包含各个 dom 节点的 class。\n */\n containerTpl?: string;\n /**\n * @title 默认模板\n * @description 每项记录的默认模板,自定义模板时必须包含各个 dom 节点的 class。\n */\n itemTpl?: string;\n /**\n * @title dom 样式\n * @description 传入各个 dom 的样式。\n */\n domStyles?: TooltipDomStyles;\n /**\n * @title tooltip 偏移量。\n */\n offset?: number;\n /**\n * @title 是否将 tooltip items 逆序\n */\n reversed?: boolean;\n /**\n * @title 是否显示空值的 tooltip 项目\n */\n showNil?: boolean;\n /**\n * @description 在 tooltip 渲染之前,对最终的 items 进行自定义处理(比如排序、过滤、格式化等)\n */\n customItems?: (originalItems: TooltipItem[]) => TooltipItem[];\n /**\n * @title 自定义模板\n */\n customContent?: (title: string, data: any[]) => string | HTMLElement;\n}\n\n/**\n * @title 坐标系配置\n */\nexport interface CoordinateOption {\n /**\n * @title 坐标系类型\n */\n type?: 'polar' | 'theta' | 'rect' | 'cartesian' | 'helix';\n /**\n * @title 坐标系配置项,目前常用于极坐标。\n */\n cfg?: CoordinateCfg;\n /**\n * @title 坐标系变换\n * @description\n * 1. rotate 表示旋转,使用弧度制。\n * 2. scale 表示沿着 x 和 y 方向的缩放比率。\n * 3. reflect 表示沿 x 方向镜像或者沿 y 轴方向映射。\n * 4. transpose 表示 x,y 轴置换。\n */\n actions?: CoordinateActions[];\n}\n\n/**\n * @title 极坐标系支持的配置属性\n */\nexport interface CoordinateCfg {\n /**\n * @title 起始弧度\n * @description 用于极坐标,配置起始弧度。\n */\n startAngle?: number;\n /**\n * @title 结束弧度\n * @description 用于极坐标,配置结束弧度。\n */\n endAngle?: number;\n /**\n * @title 半径\n * @description 用于极坐标,配置极坐标半径,0 - 1 范围的数值。\n */\n radius?: number;\n /**\n * @title 内半径\n * @description 用于极坐标,极坐标内半径,0 -1 范围的数值。\n */\n innerRadius?: number;\n}\n\n/**\n * @title 坐标轴网格线的配置属性\n */\nexport interface AxisGridCfg {\n /**\n * @title 线的样式\n * @description\n * 属性结构如下:\n *\n * ```ts\n * {\n * type?: string; // 栅格线的类型,'line' 或者 'circle'\n * style?: ShapeAttrs; // 栅格线的样式配置项\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L407|GridLineCfg\n */\n line?: GridLineCfg;\n /**\n * @title 两个栅格线间的填充色。\n */\n alternateColor?: string | string[];\n /**\n * @title 是否关闭\n * @description 对于 circle 是否关闭 grid。\n */\n closed?: boolean;\n /**\n * @title 是否同刻度线对齐\n * @description 如果值为 false,则会显示在两个刻度中间。\n * @see \n */\n alignTick?: boolean;\n}\n\n/**\n * @title 坐标轴配置属性,chart.axis()\n */\nexport interface AxisCfg {\n /**\n * @title 是否渲染在画布顶层\n * @description 防止部分图形中,需要将 axis 显示在图形上面,避免被图形遮挡\n */\n top?: boolean;\n /**\n * @title 坐标轴的位置\n * @description 适用于直角坐标系,设置坐标轴的位置。\n */\n position?: 'top' | 'bottom' | 'right' | 'left';\n /**\n * @title 轴线\n * @description\n * 坐标轴线的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 坐标轴线的样式配置项\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L91|AxisLineCfg\n */\n line?: AxisLineCfg | null;\n /**\n * @title 刻度线线\n * @description\n * 坐标轴刻度线线的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 坐标轴刻度线的样式配置项\n * alignTick?: boolean; // 是否同 tick 对齐\n * length?: number; // 长度\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L103|AxisTickLineCfg\n */\n tickLine?: AxisTickLineCfg | null;\n /**\n * @title 子刻度线\n * @description\n * 坐标轴子刻度线的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 坐标轴刻度线的样式配置项\n * count?: number; // 子刻度个数\n * length?: number; // 子刻度线长度\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L169|AxisSubTickLineCfg\n */\n subTickLine?: AxisSubTickLineCfg | null;\n /**\n * @title 标题\n * @description\n * 标题的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * offset?: number; // 标题距离坐标轴的距离\n * style?: ShapeAttrs; // 标题文本配置项\n * autoRotate?: boolean; // 是否自动旋转\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L191|AxisTitleCfg\n */\n title?: AxisTitleCfg | null;\n /**\n * @title 文本标签\n * @description\n * 文本标签的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * // 坐标轴文本的样式\n * style?: ShapeAttrs;\n * // label 的偏移量\n * offset?: number;\n * // 文本旋转角度\n * rotate?: number;\n * // 格式化函数\n * formatter?: (text: string, item: ListItem, index: number) => any;\n * // 是否自动旋转,默认 false\n * autoRotate?: boolean | (isVertical: boolean, labelGroup: IGroup, limitLength?: number) => boolean; | string;\n * // 是否自动隐藏,默认 true\n * autoHide?: boolean | (isVertical: boolean, labelGroup: IGroup, limitLength?: number) => boolean; | string;\n * // 是否自动省略,默认 false\n * autoEllipsis?: boolean | (isVertical: boolean, labelGroup: IGroup, limitLength?: number) => boolean; | string;\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L127|AxisLabelCfg\n */\n label?: AxisLabelCfg | null;\n /**\n * @title 网格线\n * @description 坐标轴网格线的配置项,null 表示不展示。\n */\n grid?: AxisGridCfg | null;\n /**\n * @title 动画\n * @default true\n */\n animate?: boolean;\n /**\n * @title 动画参数\n */\n animateOption?: ComponentAnimateOption;\n /**\n * @title 坐标轴 label 的方向\n * @description 标记坐标轴 label 的方向,左侧为 1,右侧为 -1。\n */\n verticalFactor?: number;\n /**\n * @title 坐标轴垂直方向的最大限制长度\n * @description\n * 配置坐标轴垂直方向的最大限制长度,对文本自适应有很大影响。\n * 1. 可以直接设置像素值,如 100;\n * 2. 也可设置绝对值,如 0.2,如果是 x 轴,则相对于图表的高度,如果是 y 轴,则相对于图表的宽度\n *\n * 在 G2 中,x 轴的文本默认最大高度为图表高度的 1/2,y 轴的文本默认最大长度为图表宽度的 1/3\n */\n verticalLimitLength?: number;\n}\n\nexport interface SliderCfg {\n /**\n * @title slider 高度\n */\n readonly height?: number;\n\n /**\n * @title 滑块背景区域配置\n */\n readonly trendCfg?: Omit<TrendCfg, 'data'> & { data?: number[] };\n /**\n * @title 滑块背景样式\n */\n readonly backgroundStyle?: any;\n /**\n * @title 滑块前景样式\n */\n readonly foregroundStyle?: any;\n /**\n * @title 滑块两个操作块样式\n */\n readonly handlerStyle?: any;\n /**\n * @title 文本样式\n */\n readonly textStyle?: any;\n /**\n * @title 允许滑动位置的最小值\n */\n readonly minLimit?: number;\n /**\n * @title 允许滑动位置的最大值\n */\n readonly maxLimit?: number;\n /**\n * @title 滑块初始化的起始位置\n */\n readonly start?: number;\n /**\n * @title 滑块初始化的结束位置\n */\n readonly end?: number;\n /**\n * @title 布局的 padding\n */\n readonly padding?: number[];\n /**\n * @title 滑块文本格式化函数\n */\n formatter?: (val: any, datum: Datum, idx: number) => any;\n}\n\n/**\n * 事件 payload\n */\nexport type EventPayload = LooseObject & {\n /**\n * @title 触发事件的来源\n */\n source?: string;\n};\n\nexport type EventCallback = (event: LooseObject) => void;\n/**\n * todo: 事件名可穷举,后续需要补充\n * 事件配置项\n */\nexport interface EventCfg {\n [key: string]: EventCallback;\n}\n\n/**\n * 缩略轴的配置项\n */\nexport type SliderOption = SliderCfg | boolean;\n\n/**\n * @title 滚动条组件配置项\n */\nexport interface ScrollbarCfg {\n /**\n * @title 滚动条类型,默认 horizontal\n */\n type?: 'horizontal' | 'vertical';\n /**\n * @title 宽度,在 vertical 下生效\n */\n width?: number;\n /**\n * @title 高度,在 horizontal 下生效\n */\n height?: number;\n /**\n * @title 可选 padding\n */\n padding?: Padding;\n /**\n * @title 对应水平滚动条,为 X 轴每个分类字段的宽度;对于垂直滚动条,为 X 轴每个分类字段的高度\n */\n categorySize?: number;\n /**\n * @title 滚动的时候是否开启动画,默认跟随 view 中 animate 配置\n */\n animate?: boolean;\n /**\n * @title 主题样式设置, 暂不提供 hover 高亮滑块样式配置\n */\n style?: {\n /**\n * @title 滑道颜色\n */\n trackColor?: string;\n /**\n * @title 滑块颜色\n */\n thumbColor?: string;\n /**\n * @title 滑块高亮样式,对应主题的 hover.style.thumbColor\n */\n thumbHighlightColor?: string;\n /**\n * @title 是否圆角\n */\n lineCap?: string;\n };\n}\n\n/**\n * @title 滚动条配置\n */\nexport type ScrollbarOption = ScrollbarCfg | boolean;\n\n/**\n * @title 配置项声明式\n */\nexport interface Options {\n /**\n * @title 数据源配置。\n */\n readonly data?: Data;\n /**\n * @title 设置数据过滤条件,以 data 中的数据属性为 key。\n */\n readonly filters?: Record<string, FilterCondition>;\n /**\n * @title 坐标轴配置,以 data 中的数据属性为 key。\n */\n readonly axes?: Record<string, AxisOption> | boolean;\n /**\n * @title 图例配置,以 data 中的数据属性为 key。\n */\n readonly legends?: AllLegendsOptions;\n /**\n * @title 列定义配置,用于配置数值的类型等,以 data 中的数据属性为 key。\n */\n readonly scales?: Record<string, ScaleOption>;\n /**\n * @title Tooltip 配置。\n */\n readonly tooltip?: TooltipOption;\n /**\n * @title 坐标系配置。\n */\n readonly coordinate?: CoordinateOption;\n /**\n * @title 静态辅助元素声明。\n */\n readonly annotations?: (\n | ArcOption\n | RegionFilterOption\n | ImageOption\n | LineOption\n | TextOption\n | RegionOption\n | DataMarkerOption\n | DataRegionOption\n )[];\n /**\n * @title Geometry 配置\n */\n readonly geometries?: GeometryOption[];\n /**\n * @title 开启/关闭动画,默认开启\n */\n readonly animate?: boolean;\n /**\n * @title 配置需要使用的交互行为\n */\n readonly interactions?: InteractionOption[];\n /**\n * @title 事件配置\n */\n readonly events?: EventCfg;\n\n /**\n * @title 缩略轴的配置\n */\n readonly slider?: SliderOption;\n\n /**\n * @title 滚动条配置\n */\n readonly scrollbar?: ScrollbarOption;\n\n /**\n * @title 子 View\n */\n readonly views?: ViewOption[];\n\n /**\n * @title 分面\n */\n readonly facets?: (RectCfg | MirrorCfg | CircleCfg | ListCfg | TreeCfg)[];\n\n /**\n * @title 其他自定义的 option\n */\n readonly [name: string]: any;\n}\n\n/**\n * @title 支持的 Marker 类型\n */\nexport type Marker =\n | 'circle'\n | 'square'\n | 'diamond'\n | 'triangle'\n | 'triangle-down'\n | 'hexagon'\n | 'bowtie'\n | 'cross'\n | 'tick'\n | 'plus'\n | 'hyphen'\n | 'line';\n/**\n * @title 自定义 Marker 的回调函数定义\n */\nexport type MarkerCallback = (x: number, y: number, r: number) => PathCommand[];\n/**\n * @title chart.tooltip() 参数类型\n */\nexport type TooltipOption = TooltipCfg | boolean;\n/* 筛选器函数类型定义 */\nexport type FilterCondition = (value: any, datum: Datum, idx?: number) => boolean;\n/**\n * @title chart.axis() 参数类型\n */\nexport type AxisOption = AxisCfg | boolean;\n/**\n * @title chart.legend() 参数类型\n */\nexport type LegendOption = LegendCfg | boolean;\n/**\n * @title Options 中 legends 的配置定义\n */\nexport type AllLegendsOptions = LegendCfg | Record<string, LegendOption> | boolean;\n/**\n * @title G2 支持的度量类型\n */\nexport type ScaleType =\n | 'linear'\n | 'cat'\n | 'category'\n | 'identity'\n | 'log'\n | 'pow'\n | 'time'\n | 'timeCat'\n | 'quantize'\n | 'quantile';\n\nexport type CoordinateRotate = ['rotate', number];\nexport type CoordinateReflect = ['reflect', 'x' | 'y'];\nexport type CoordinateScale = ['scale', number, number];\nexport type CoordinateTranspose = ['transpose'];\n/**\n * @title 坐标系支持的 action 配置\n */\nexport type CoordinateActions = CoordinateRotate | CoordinateReflect | CoordinateScale | CoordinateTranspose;\n\n// ============================ Facet 分面相关类型定义 ============================\n// 分面基类\nexport type FacetCtor = new (view: View, cfg: any) => Facet;\n\nexport interface Condition {\n readonly field: string;\n readonly value: any;\n readonly values: any[];\n}\n\nexport type FacetDataFilter = (data: Datum[]) => boolean;\n\n/**\n * 默认的基础配置\n */\nexport interface FacetCfg<D> {\n /**\n * @title 布局类型。\n */\n readonly type?: string;\n /**\n * @title view 创建回调。\n */\n readonly eachView: (innerView: View, facet?: D) => any;\n /**\n * @title 分面 view 之间的间隔, 百分比或像素值\n */\n readonly spacing?: [number | string, number | string];\n /**\n * @title facet view padding。\n */\n readonly padding?: ViewPadding;\n /**\n * @title 是否显示标题。\n */\n readonly showTitle?: boolean;\n /**\n * @title facet 数据划分维度。\n */\n readonly fields: string[];\n}\n\n/**\n * Facet title 配置项\n */\nexport interface FacetTitle {\n /**\n * @title x 方向偏移。\n */\n readonly offsetX?: number;\n /**\n * @title y 方向偏移。\n */\n readonly offsetY?: number;\n /**\n * @title 文本样式。\n */\n readonly style?: object;\n /**\n * @title 格式化\n */\n readonly formatter?: (val: any) => any;\n}\n\n/**\n * 分面数据\n */\nexport interface FacetData {\n /**\n * @title 分面类型。\n */\n readonly type: string;\n /**\n * @title 当前分面子 view 的数据。\n */\n readonly data: object[];\n /**\n * @title 当前分面子 view 的范围。\n */\n readonly region: Region;\n /**\n * @title 当前分面子 view 的 padding。\n */\n readonly padding?: number;\n /**\n * @title 当前 facet 对应生成的 view。\n */\n view?: View;\n\n // facet data\n /**\n * @title 分面行字段。\n */\n readonly rowField: string;\n /**\n * @title 分面列字段。\n */\n readonly columnField: string;\n /**\n * @title 当前行分面的枚举值。\n */\n readonly rowValue: string;\n /**\n * @title 当前列分面的枚举值。\n */\n readonly columnValue: string;\n /**\n * @title 当前行索引。\n */\n readonly rowIndex: number;\n /**\n * @title 当前列索引。\n */\n readonly columnIndex: number;\n /**\n * @title 当前行字段的枚举值长度。\n */\n readonly rowValuesLength: number;\n /**\n * @title 当前列字段的枚举值长度。\n */\n readonly columnValuesLength: number;\n}\n\n// ===================== rect 相关类型定义 =====================\n/**\n * @title rect 分面类型配置\n */\nexport interface RectCfg extends FacetCfg<RectData> {\n /**\n * @title 行标题的样式。\n */\n readonly columnTitle?: FacetTitle;\n /**\n * @title 列标题的样式。\n */\n readonly rowTitle?: FacetTitle;\n}\n\nexport type RectData = FacetData;\n\n// ===================== mirror 相关类型定义 =====================\n/**\n * @title mirror 分面类型配置\n */\nexport interface MirrorCfg extends FacetCfg<MirrorData> {\n /**\n * @title 是否转置。\n */\n readonly transpose?: boolean;\n /**\n * @title 标题样式。\n */\n readonly title?: FacetTitle;\n}\n\nexport type MirrorData = FacetData;\n\n// ===================== list 相关类型定义 =====================\n/**\n * @title list 分面类型配置\n */\nexport interface ListCfg extends FacetCfg<ListData> {\n /**\n * @title 指定每行可显示分面的个数,超出时会自动换行。\n */\n readonly cols?: number;\n /**\n * @title 每个分面标题配置。\n */\n readonly title?: FacetTitle;\n}\n\nexport interface ListData extends FacetData {\n readonly total?: number;\n}\n\n// ===================== matrix 相关类型定义 =====================\n/**\n * @title matrix 分面类型配置\n */\nexport interface MatrixCfg extends FacetCfg<MirrorData> {\n /**\n * @title 列标题的样式\n */\n readonly columnTitle?: FacetTitle;\n /**\n * @title 列标题的样式\n */\n readonly rowTitle?: FacetTitle;\n}\n\nexport type MatrixData = FacetData;\n\n// ===================== circle 相关类型定义 =====================\n/**\n * @title circle 分面类型配置\n */\nexport interface CircleCfg extends FacetCfg<CircleData> {\n /**\n * @title 分面标题配置。\n */\n readonly title?: FacetTitle;\n}\n\nexport type CircleData = FacetData;\n\n// ===================== tree 相关类型定义 =====================\n\nexport interface Line {\n readonly style?: ShapeAttrs;\n readonly smooth?: boolean;\n}\n/**\n * @title tree 分面类型配置\n */\nexport interface TreeCfg extends FacetCfg<TreeData> {\n readonly line?: Line;\n readonly title?: FacetTitle;\n}\n\nexport interface TreeData extends FacetData {\n children?: TreeData[];\n originColIndex?: number;\n}\n\n/**\n * facet object map\n */\nexport interface FacetCfgMap {\n /**\n * @title rect 类型分面配置\n */\n readonly rect: RectCfg;\n /**\n * @title mirror 类型分面配置\n */\n readonly mirror: MirrorCfg;\n /**\n * @title list 类型分面配置\n */\n readonly list: ListCfg;\n /**\n * @title matrix 类型分面配置\n */\n readonly matrix: MatrixCfg;\n /**\n * @title circle 类型分面配置\n */\n readonly circle: CircleCfg;\n /**\n * @title tree 类型分面配置\n */\n readonly tree: TreeCfg;\n}\n\n// ============================ 主题样式表定义 ============================\nexport interface StyleSheet {\n /**\n * @title 背景色\n */\n backgroundColor?: string;\n /**\n * @title 主题色\n */\n brandColor?: string;\n /**\n * @title 辅助色\n */\n subColor?: string;\n /**\n * @title 分类色板 1,在数据量小于等于 10 时使用\n */\n paletteQualitative10?: string[];\n /**\n * @title 分类色板 2,在数据量大于 10 时使用\n */\n paletteQualitative20?: string[];\n /**\n * @title 语义色\n */\n paletteSemanticRed?: string;\n /**\n * @title 语义色\n */\n paletteSemanticGreen?: string;\n /**\n * @title 语义色\n */\n paletteSemanticYellow?: string;\n /**\n * @title (单色)顺序色板\n */\n paletteSequence?: string[];\n /**\n * @title 字体\n */\n fontFamily?: string;\n\n // -------------------- 坐标轴 --------------------\n /**\n * @title 坐标轴线颜色\n */\n axisLineBorderColor?: string;\n /**\n * @title 坐标轴线粗细\n */\n axisLineBorder?: number;\n /**\n * @title 坐标轴线 lineDash 设置\n */\n axisLineDash?: number[];\n\n /**\n * @title 坐标轴标题颜色\n */\n axisTitleTextFillColor?: string;\n /**\n * @title 坐标轴标题文本字体大小\n */\n axisTitleTextFontSize?: number;\n /**\n * @title 坐标轴标题文本行高\n */\n axisTitleTextLineHeight?: number;\n /**\n * @title 坐标轴标题文本字体粗细\n */\n axisTitleTextFontWeight?: number | string;\n /**\n * @title 坐标轴标题距离坐标轴文本的间距\n */\n axisTitleSpacing?: number;\n\n /**\n * @title 坐标轴刻度线颜色\n */\n axisTickLineBorderColor?: string;\n /**\n * @title 坐标轴刻度线长度\n */\n axisTickLineLength?: number;\n /**\n * @title 坐标轴刻度线粗细\n */\n axisTickLineBorder?: number;\n\n /**\n * @title 坐标轴次刻度线颜色\n */\n axisSubTickLineBorderColor?: string;\n /**\n * @title 坐标轴次刻度线长度\n */\n axisSubTickLineLength?: number;\n /**\n * @title 坐标轴次刻度线粗细\n */\n axisSubTickLineBorder?: number;\n\n /**\n * @title 坐标轴刻度文本颜色\n */\n axisLabelFillColor?: string;\n /**\n * @title 坐标轴刻度文本字体大小\n */\n axisLabelFontSize?: number;\n /**\n * @title 坐标轴刻度文本行高\n */\n axisLabelLineHeight?: number;\n /**\n * @title 坐标轴刻度文本字体粗细\n */\n axisLabelFontWeight?: number | string;\n /**\n * @title 坐标轴刻度文本距离坐标轴线的间距\n */\n axisLabelOffset: number;\n\n /**\n * @title 坐标轴网格线颜色\n */\n axisGridBorderColor?: string;\n /**\n * @title 坐标轴网格线粗细\n */\n axisGridBorder?: number;\n /**\n * @title 坐标轴网格线虚线设置\n */\n axisGridLineDash?: number[];\n\n // -------------------- 图例 --------------------\n /**\n * @title 图例标题颜色\n */\n legendTitleTextFillColor?: string;\n /**\n * @title 图例标题文本字体大小\n */\n legendTitleTextFontSize?: number;\n /**\n * @title 图例标题文本行高\n */\n legendTitleTextLineHeight?: number;\n /**\n * @title 图例标题文本字体粗细\n */\n legendTitleTextFontWeight?: number | string;\n\n /**\n * @title 图例 marker 颜色\n */\n legendMarkerColor?: string;\n /**\n * @title 图例 marker 距离图例文本的间距\n */\n legendMarkerSpacing?: number;\n /**\n * @title 图例 marker 默认半径大小\n */\n legendMarkerSize?: number;\n /**\n * @title 图例 'circle' marker 半径\n */\n legendCircleMarkerSize?: number;\n /**\n * @title 图例 'square' marker 半径\n */\n legendSquareMarkerSize?: number;\n /**\n * @title 图例 'line' marker 半径\n */\n legendLineMarkerSize?: number;\n\n /**\n * @title 图例项文本颜色\n */\n legendItemNameFillColor?: string;\n /**\n * @title 图例项文本字体大小\n */\n legendItemNameFontSize?: number;\n /**\n * @title 图例项文本行高\n */\n legendItemNameLineHeight?: number;\n /**\n * @title 图例项粗细\n */\n legendItemNameFontWeight?: number | string;\n /**\n * @title 图例项之间的水平间距\n */\n legendItemSpacing?: number;\n /**\n * @title 图例项垂直方向的间隔\n */\n legendItemMarginBottom?: number;\n /**\n * @title 图例与图表绘图区域的偏移距离\n */\n legendPadding?: number[];\n /**\n * @title 水平布局的图例与绘图区域偏移距离\n */\n legendHorizontalPadding?: number[];\n /**\n * @title 垂直布局的图例与绘图区域偏移距离\n */\n legendVerticalPadding?: number[];\n\n /**\n * @title 图例分页器 marker 大小\n */\n legendPageNavigatorMarkerSize: number;\n /**\n * @title 图例分页器 marker 非激活状态填充色\n */\n legendPageNavigatorMarkerInactiveFillColor: string;\n /**\n * @title 图例分页器 marker 非激活状态填充色透明度\n */\n legendPageNavigatorMarkerInactiveFillOpacity: number;\n /**\n * @title 图例分页器 marker 填充色\n */\n legendPageNavigatorMarkerFillColor: string;\n /**\n * @title 图例分页器 marker 填充色透明度\n */\n legendPageNavigatorMarkerFillOpacity: number;\n /**\n * @title 图例分页器文本颜色\n */\n legendPageNavigatorTextFillColor: string;\n /**\n * @title 图例分页器文本字体大小\n */\n legendPageNavigatorTextFontSize: number;\n\n /**\n * @title 连续图例滑块填充色\n */\n sliderRailFillColor?: string;\n /**\n * @title 连续图例滑块边框粗细\n */\n sliderRailBorder?: number;\n /**\n * @title 连续图例滑块边框颜色\n */\n sliderRailBorderColor?: string;\n /**\n * @title 连续图例滑块宽度\n */\n sliderRailWidth?: number;\n /**\n * @title 连续图例滑块高度\n */\n sliderRailHeight?: number;\n\n /**\n * @title 连续图例文本颜色\n */\n sliderLabelTextFillColor?: string;\n /**\n * @title 连续图例文本字体大小\n */\n sliderLabelTextFontSize?: number;\n /**\n * @title 连续图例文本行高\n */\n sliderLabelTextLineHeight?: number;\n /**\n * @title 连续图例文本字体粗细\n */\n sliderLabelTextFontWeight?: number | string;\n\n /**\n * @title 连续图例滑块颜色\n */\n sliderHandlerFillColor?: string;\n /**\n * @title 连续图例滑块宽度\n */\n sliderHandlerWidth?: number;\n /**\n * @title 连续图例滑块高度\n */\n sliderHandlerHeight?: number;\n /**\n * @title 连续图例滑块边框粗细\n */\n sliderHandlerBorder?: number;\n /**\n * @title 连续图例滑块边框颜色\n */\n sliderHandlerBorderColor?: string;\n\n // -------------------- Annotation,图形标注 --------------------\n /**\n * @title arc 图形标注描边颜色\n */\n annotationArcBorderColor?: string;\n /**\n * @title arc 图形标注粗细\n */\n annotationArcBorder?: number;\n\n /**\n * @title line 图形标注颜色\n */\n annotationLineBorderColor?: string;\n /**\n * @title line 图形标注粗细\n */\n annotationLineBorder?: number;\n /**\n * @title lube 图形标注的虚线间隔\n */\n annotationLineDash?: number[];\n\n /**\n * @title text 图形标注文本颜色\n */\n annotationTextFillColor?: string;\n /**\n * @title text 图形标注文本字体大小\n */\n annotationTextFontSize?: number;\n /**\n * @title text 图形标注文本行高\n */\n annotationTextLineHeight?: number;\n /**\n * @title text 图形标注文本字体粗细\n */\n annotationTextFontWeight?: number | string;\n\n /**\n * @title text 图形标注文本边框颜色\n */\n annotationTextBorderColor?: string;\n /**\n * @title text 图形标注文本边框粗细\n */\n annotationTextBorder?: number;\n\n /**\n * @title region 图形标注填充颜色\n */\n annotationRegionFillColor?: string;\n /**\n * @title region 图形标注填充颜色透明色\n */\n annotationRegionFillOpacity?: number;\n /**\n * @title region 图形标注描边粗细\n */\n annotationRegionBorder?: number;\n /**\n * @title region 图形标注描边颜色\n */\n annotationRegionBorderColor?: string;\n\n /**\n * @title dataMarker 图形标注的连接线长度\n */\n annotationDataMarkerLineLength?: number;\n\n // -------------------- Tooltip --------------------\n /**\n * @title tooltip crosshairs 辅助线颜色\n */\n tooltipCrosshairsBorderColor?: string;\n /**\n * @title tooltip crosshairs 辅助线粗细\n */\n tooltipCrosshairsBorder?: number;\n /**\n * @title tooltip crosshairs 辅助线虚线间隔\n */\n tooltipCrosshairsLineDash?: number[];\n\n /**\n * @title tooltip 内容框背景色\n */\n tooltipContainerFillColor?: string;\n /**\n * @title tooltip 内容框背景透明度\n */\n tooltipContainerFillOpacity?: number;\n /**\n * @title tooltip 内容框阴影\n */\n tooltipContainerShadow?: string;\n /**\n * @title tooltip 内容框圆角\n */\n tooltipContainerBorderRadius?: number;\n\n /**\n * @title tooltip 文本颜色\n */\n tooltipTextFillColor?: string;\n /**\n * @title tooltip 文本字体大小\n */\n tooltipTextFontSize?: number;\n /**\n * @title tooltip 文本行高\n */\n tooltipTextLineHeight?: number;\n /**\n * @title tooltip 文本字体粗细\n */\n tooltipTextFontWeight?: number | string;\n\n // -------------------- Geometry labels --------------------\n /**\n * @title Geometry label 文本颜色\n */\n labelFillColor?: string;\n /**\n * @title Geometry label 暗色文本颜色\n */\n labelFillColorDark?: string;\n /**\n * @title Geometry label 亮色文本颜色\n */\n labelFillColorLight?: string;\n /**\n * @title Geometry label 文本字体大小\n */\n labelFontSize?: number;\n /**\n * @title Geometry label 文本行高\n */\n labelLineHeight?: number;\n /**\n * @title Geometry label 文本字体粗细\n */\n labelFontWeight?: number | string;\n /**\n * @title Geometry label 文本描边颜色\n */\n labelBorderColor?: string;\n /**\n * @title Geometry label 文本描边粗细\n */\n labelBorder?: number;\n\n /**\n * @title Geometry innerLabel 文本颜色\n */\n innerLabelFillColor?: string;\n /**\n * @title Geometry innerLabel 文本字体大小\n */\n innerLabelFontSize?: number;\n /**\n * @title Geometry innerLabel 文本行高\n */\n innerLabelLineHeight?: number;\n /**\n * @title Geometry innerLabel 文本字体粗细\n */\n innerLabelFontWeight?: number | string;\n /**\n * @title Geometry innerLabel 文本描边颜色\n */\n innerLabelBorderColor?: string;\n /**\n * @title Geometry innerLabel 文本描边粗细\n */\n innerLabelBorder?: number;\n\n /**\n * @title Geometry overflowLabel 文本颜色\n */\n overflowLabelFillColor?: string;\n /**\n * @title Geometry overflowLabel 暗色文本颜色\n */\n overflowLabelFillColorDark?: string;\n /**\n * @title Geometry overflowLabel 亮色文本颜色\n */\n overflowLabelFillColorLight?: string;\n /**\n * @title Geometry overflowLabel 文本字体大小\n */\n overflowLabelFontSize?: number;\n /**\n * @title Geometry overflowLabel 文本行高\n */\n overflowLabelLineHeight?: number;\n /**\n * @title Geometry overflowLabel 文本字体粗细\n */\n overflowLabelFontWeight?: number | string;\n /**\n * @title Geometry overflowLabel 文本描边颜色\n */\n overflowLabelBorderColor?: string;\n /**\n * @title Geometry overflowLabel 文本描边粗细\n */\n overflowLabelBorder?: number;\n\n /**\n * @title Geometry label 文本连接线粗细\n */\n labelLineBorder?: number;\n /**\n * @title Geometry label 文本连接线颜色\n */\n labelLineBorderColor?: string;\n\n // -------------------- Slider 组件样式--------------------\n /**\n * @title slider 滑道高度\n */\n cSliderRailHieght?: number;\n /**\n * @title slider 滑道背景色\n */\n cSliderBackgroundFillColor?: string;\n /**\n * @title slider 滑道背景色透明度\n */\n cSliderBackgroundFillOpacity?: number;\n /**\n * @title slider 滑道前景色\n */\n cSliderForegroundFillColor?: string;\n /**\n * @title slider 滑道前景色透明度\n */\n cSliderForegroundFillOpacity?: number;\n\n // slider handlerStyle 手柄样式\n /**\n * @title slider 手柄高度\n */\n cSliderHandlerHeight?: number;\n /**\n * @title Slider 手柄宽度\n */\n cSliderHandlerWidth?: number;\n /**\n * @title Slider 手柄背景色\n */\n cSliderHandlerFillColor?: string;\n /**\n * @title Slider 手柄背景色透明度\n */\n cSliderHandlerFillOpacity?: number;\n /**\n * @title Slider 手柄高亮背景色\n */\n cSliderHandlerHighlightFillColor?: string;\n /**\n * @title Slider 手柄边框色\n */\n cSliderHandlerBorderColor?: string;\n /**\n * @title Slider 手柄边框粗细\n */\n cSliderHandlerBorder?: number;\n /**\n * @title Slider 手柄边框圆角\n */\n cSliderHandlerBorderRadius?: number;\n\n // slider textStyle 字体标签样式\n /**\n * @title Slider 字体标签颜色\n */\n cSliderTextFillColor?: string;\n /**\n * @title Slider 字体标签透明度\n */\n cSliderTextFillOpacity?: number;\n /**\n * @title Slider 字体标签大小\n */\n cSliderTextFontSize?: number;\n /**\n * @title Slider 字体标签行高\n */\n cSliderTextLineHeight?: number;\n /**\n * @title Slider 字体标签字重\n */\n cSliderTextFontWeight?: number | string;\n /**\n * @title Slider 字体标签描边色\n */\n cSliderTextBorderColor?: string;\n /**\n * @title Slider 字体标签描边粗细\n */\n cSliderTextBorder?: number;\n\n // -------------------- Scrollbar 组件样式--------------------\n /**\n * @title 滚动条 滚道填充色\n */\n scrollbarTrackFillColor?: string;\n /**\n * @title 滚动条 滑块填充色\n */\n scrollbarThumbFillColor?: string;\n /**\n * @title 滚动条 滑块高亮填充色\n */\n scrollbarThumbHighlightFillColor?: string;\n\n // -------------------- Geometry 图形样式--------------------\n /**\n * @title 点图的大小范围\n */\n pointSizeRange?: [number, number];\n /**\n * @title 点图填充颜色\n */\n pointFillColor?: string;\n /**\n * @title 点图填充颜色透明度\n */\n pointFillOpacity?: number;\n /**\n * @title 点图大小\n */\n pointSize?: number;\n /**\n * @title 点图描边粗细\n */\n pointBorder?: number;\n /**\n * @title 点图描边颜色\n */\n pointBorderColor?: string;\n /**\n * @title 点图描边透明度\n */\n pointBorderOpacity?: number;\n\n /**\n * @title 点图 active 状态下填充颜色\n */\n pointActiveFillColor?: string;\n /**\n * @title 点图 active 状态下填充颜色透明度\n */\n pointActiveFillOpacity?: number;\n /**\n * @title 点图 active 状态下大小\n */\n pointActiveSize?: number;\n /**\n * @title 点图 active 状态下描边粗细\n */\n pointActiveBorder?: number;\n /**\n * @title 点图 active 状态下描边颜色\n */\n pointActiveBorderColor?: string;\n /**\n * @title 点图 active 状态下描边透明度\n */\n pointActiveBorderOpacity?: number;\n\n /**\n * @title 点图 selected 状态下填充颜色\n */\n pointSelectedFillColor?: string;\n /**\n * @title 点图 selected 状态下填充颜色透明度\n */\n pointSelectedFillOpacity?: number;\n /**\n * @title 点图 selected 状态下大小\n */\n pointSelectedSize?: number;\n /**\n * @title 点图 selected 状态下描边粗细\n */\n pointSelectedBorder?: number;\n /**\n * @title 点图 selected 状态下描边颜色\n */\n pointSelectedBorderColor?: string;\n /**\n * @title 点图 selected 状态下描边透明度\n */\n pointSelectedBorderOpacity?: number;\n\n /**\n * @title 点图 inactive 状态下填充颜色\n */\n pointInactiveFillColor?: string;\n /**\n * @title 点图 inactive 状态下填充颜色透明度\n */\n pointInactiveFillOpacity?: number;\n /**\n * @title 点图 inactive 状态下大小\n */\n pointInactiveSize?: number;\n /**\n * @title 点图 inactive 状态下描边粗细\n */\n pointInactiveBorder?: number;\n /**\n * @title 点图 inactive 状态下描边颜色\n */\n pointInactiveBorderColor?: string;\n /**\n * @title 点图 inactive 状态下描边透明度\n */\n pointInactiveBorderOpacity?: number;\n\n /**\n * @title 描边点图大小\n */\n hollowPointSize?: number;\n /**\n * @title 描边点图描边粗细\n */\n hollowPointBorder?: number;\n /**\n * @title 描边点图描边颜色\n */\n hollowPointBorderColor?: string;\n /**\n * @title 描边点图描边透明度\n */\n hollowPointBorderOpacity?: number;\n /**\n * @title 描边点图填充颜色\n */\n hollowPointFillColor?: string;\n /**\n * @title 描边点图填充透明度\n */\n hollowPointFillOpacity?: number;\n\n /**\n * @title 点 描边 active 状态下大小\n */\n hollowPointActiveSize?: number;\n /**\n * @title 点 描边 active 状态下描边粗细\n */\n hollowPointActiveBorder?: number;\n /**\n * @title 点 描边 active 状态下描边颜色\n */\n hollowPointActiveBorderColor?: string;\n /**\n * @title 点 描边 active 状态下描边透明度\n */\n hollowPointActiveBorderOpacity?: number;\n\n /**\n * @title 点 描边 selected 状态下大小\n */\n hollowPointSelectedSize?: number;\n /**\n * @title 点 描边 selected 状态下描边粗细\n */\n hollowPointSelectedBorder?: number;\n /**\n * @title 点 描边 selected 状态下描边颜色\n */\n hollowPointSelectedBorderColor?: string;\n /**\n * @title 点 描边 selected 状态下描边透明度\n */\n hollowPointSelectedBorderOpacity?: number;\n\n /**\n * @title 点 描边 inactive 状态下大小\n */\n hollowPointInactiveSize?: number;\n /**\n * @title 点 描边 inactive 状态下描边粗细\n */\n hollowPointInactiveBorder?: number;\n /**\n * @title 点 描边 inactive 状态下描边颜色\n */\n hollowPointInactiveBorderColor?: string;\n /**\n * @title 点 描边 inactive 状态下描边透明度\n */\n hollowPointInactiveBorderOpacity?: number;\n\n /**\n * @title 线图粗细\n */\n lineBorder?: number;\n /**\n * @title 线图颜色\n */\n lineBorderColor?: string;\n /**\n * @title 线图透明度\n */\n lineBorderOpacity?: number;\n\n /**\n * @title 线图 active 状态下粗细\n */\n lineActiveBorder?: number;\n /**\n * @title 线图 active 状态下颜色\n */\n lineActiveBorderColor?: string;\n /**\n * @title 线图 active 状态下透明度\n */\n lineActiveBorderOpacity?: number;\n\n /**\n * @title 线图 selected 状态下粗细\n */\n lineSelectedBorder?: number;\n /**\n * @title 线图 selected 状态下颜色\n */\n lineSelectedBorderColor?: string;\n /**\n * @title 线图 selected 状态下透明度\n */\n lineSelectedBorderOpacity?: number;\n\n /**\n * @title 线图 inactive 状态下粗细\n */\n lineInactiveBorder?: number;\n /**\n * @title 线图 inactive 状态下颜色\n */\n lineInactiveBorderColor?: string;\n /**\n * @title 线图 inactive 状态下透明度\n */\n lineInactiveBorderOpacity?: number;\n\n areaBorder?: number;\n /**\n * @title area 边框颜色\n */\n areaBorderColor?: string;\n /**\n * @title area 边框透明度\n */\n areaBorderOpacity?: number;\n /**\n * @title area 填充颜色\n */\n areaFillColor?: string;\n /**\n * @title area 填充透明度\n */\n areaFillOpacity?: number;\n\n /**\n * @title area Active 状态下边框粗细\n */\n areaActiveBorder?: number;\n /**\n * @title area Active 状态下边框颜色\n */\n areaActiveBorderColor?: string;\n /**\n * @title area Active 状态下边框透明度\n */\n areaActiveBorderOpacity?: number;\n /**\n * @title area Active 状态下填充颜色\n */\n areaActiveFillColor?: string;\n /**\n * @title area Active 状态下填充透明度\n */\n areaActiveFillOpacity?: number;\n\n /**\n * @title area selected 状态下边框粗细\n */\n areaSelectedBorder?: number;\n /**\n * @title area selected 状态下边框颜色\n */\n areaSelectedBorderColor?: string;\n /**\n * @title area selected 状态下边框透明度\n */\n areaSelectedBorderOpacity?: number;\n /**\n * @title area selected 状态下填充颜色\n */\n areaSelectedFillColor?: string;\n /**\n * @title area selected 状态下填充透明度\n */\n areaSelectedFillOpacity?: number;\n\n /**\n * @title area inactive 状态下边框粗细\n */\n areaInactiveBorder?: number;\n /**\n * @title area inactive 状态下边框颜色\n */\n areaInactiveBorderColor?: string;\n /**\n * @title area inactive 状态下边框透明度\n */\n areaInactiveBorderOpacity?: number;\n /**\n * @title area inactive 状态下填充颜色\n */\n areaInactiveFillColor?: string;\n /**\n * @title area inactive 状态下填充透明度\n */\n areaInactiveFillOpacity?: number;\n\n /**\n * @title hollowArea 边框粗细\n */\n hollowAreaBorder?: number;\n /**\n * @title hollowArea 边框颜色\n */\n hollowAreaBorderColor?: string;\n /**\n * @title hollowArea 边框透明度\n */\n hollowAreaBorderOpacity?: number;\n\n /**\n * @title hollowArea Active 状态下边框粗细\n */\n hollowAreaActiveBorder?: number;\n /**\n * @title hollowArea Active 状态下边框颜色\n */\n hollowAreaActiveBorderColor?: string;\n /**\n * @title hollowArea Active 状态下边框透明度\n */\n hollowAreaActiveBorderOpacity?: number;\n\n /**\n * @title hollowArea selected 状态下边框粗细\n */\n hollowAreaSelectedBorder?: number;\n /**\n * @title hollowArea selected 状态下边框颜色\n */\n hollowAreaSelectedBorderColor?: string;\n /**\n * @title hollowArea selected 状态下边框透明度\n */\n hollowAreaSelectedBorderOpacity?: number;\n\n /**\n * @title hollowArea inactive 状态下边框粗细\n */\n hollowAreaInactiveBorder?: number;\n /**\n * @title hollowArea inactive 状态下边框颜色\n */\n hollowAreaInactiveBorderColor?: string;\n /**\n * @title hollowArea inactive 状态下边框透明度\n */\n hollowAreaInactiveBorderOpacity?: number;\n\n /**\n * @title interval 边框粗细\n */\n intervalBorder?: number;\n /**\n * @title interval 边框颜色\n */\n intervalBorderColor?: string;\n /**\n * @title interval 边框透明度\n */\n intervalBorderOpacity?: number;\n /**\n * @title interval 填充颜色\n */\n intervalFillColor?: string;\n /**\n * @title interval 填充透明度\n */\n intervalFillOpacity?: number;\n\n /**\n * @title interval active 状态下边框粗细\n */\n intervalActiveBorder?: number;\n /**\n * @title interval active 状态下边框颜色\n */\n intervalActiveBorderColor?: string;\n /**\n * @title interval active 状态下边框透明度\n */\n intervalActiveBorderOpacity?: number;\n /**\n * @title interval active 状态下填充颜色\n */\n intervalActiveFillColor?: string;\n /**\n * @title interval active 状态下填充透明度\n */\n intervalActiveFillOpacity?: number;\n\n /**\n * @title interval selected 状态下边框粗细\n */\n intervalSelectedBorder?: number;\n /**\n * @title interval selected 状态下边框颜色\n */\n intervalSelectedBorderColor?: string;\n /**\n * @title interval selected 状态下边框透明度\n */\n intervalSelectedBorderOpacity?: number;\n /**\n * @title interval selected 状态下填充颜色\n */\n intervalSelectedFillColor?: string;\n /**\n * @title interval selected 状态下填充透明度\n */\n intervalSelectedFillOpacity?: number;\n\n /**\n * @title interval inactive 状态下边框粗细\n */\n intervalInactiveBorder?: number;\n /**\n * @title interval inactive 状态下边框颜色\n */\n intervalInactiveBorderColor?: string;\n /**\n * @title interval inactive 状态下边框透明度\n */\n intervalInactiveBorderOpacity?: number;\n /**\n * @title interval inactive 状态下填充颜色\n */\n intervalInactiveFillColor?: string;\n /**\n * @title interval inactive 状态下填充透明度\n */\n intervalInactiveFillOpacity?: number;\n\n /**\n * @title hollowInterval 边框粗细\n */\n hollowIntervalBorder?: number;\n /**\n * @title hollowInterval 边框颜色\n */\n hollowIntervalBorderColor?: string;\n /**\n * @title hollowInterval 边框透明度\n */\n hollowIntervalBorderOpacity?: number;\n /**\n * @title hollowInterval 填充颜色\n */\n hollowIntervalFillColor?: string;\n /**\n * @title hollowInterval 填充透明度\n */\n hollowIntervalFillOpacity?: number;\n\n /**\n * @title hollowInterval active 状态下边框粗细\n */\n hollowIntervalActiveBorder?: number;\n /**\n * @title hollowInterval active 状态下边框颜色\n */\n hollowIntervalActiveBorderColor?: string;\n /**\n * @title hollowInterval active 状态下边框透明度\n */\n hollowIntervalActiveBorderOpacity?: number;\n\n /**\n * @title hollowInterval selected 状态下边框粗细\n */\n hollowIntervalSelectedBorder?: number;\n /**\n * @title hollowInterval selected 状态下边框颜色\n */\n hollowIntervalSelectedBorderColor?: string;\n /**\n * @title hollowInterval selected 状态下边框透明度\n */\n hollowIntervalSelectedBorderOpacity?: number;\n\n /**\n * @title hollowInterval inactive 状态下边框粗细\n */\n hollowIntervalInactiveBorder?: number;\n /**\n * @title hollowInterval inactive 状态下边框颜色\n */\n hollowIntervalInactiveBorderColor?: string;\n /**\n * @title hollowInterval inactive 状态下边框透明度\n */\n hollowIntervalInactiveBorderOpacity?: number;\n}\n\n/**\n * @title createTheme 主题样式表配置\n */\nexport type StyleSheetCfg = Partial<StyleSheet>;\n\n// ============================ 交互相关的类型定义 ============================\n/**\n * @title 交互反馈的定义\n */\nexport interface IAction {\n /**\n * 初始化\n */\n init();\n /**\n * 交互 action (反馈)的名称\n */\n name: string;\n /**\n * 上下文\n */\n context: IInteractionContext;\n /**\n * 销毁函数\n */\n destroy();\n}\n\n/**\n * @title 交互上下文的接口定义\n */\nexport interface IInteractionContext extends LooseObject {\n /**\n * @title 事件对象\n */\n event: LooseObject;\n /**\n * 当前的 view\n */\n view: View;\n /**\n * @title 交互相关的 Actions\n */\n actions: IAction[];\n /**\n * 缓存属性,用于上下文传递信息\n * @param key 键名\n * @param value 值\n */\n cache(key: string, value?: any);\n /**\n * 获取 action\n * @param name - action 的名称\n * @returns 指定 name 的 Action\n */\n getAction(name): IAction;\n /**\n * 获取当前的点\n * @returns 返回当前的点\n */\n getCurrentPoint(): Point;\n /**\n * 获取当前的图形\n */\n getCurrentShape(): IShape;\n /**\n * 添加 action\n * @param action 指定交互 action\n */\n addAction(action: IAction);\n /**\n * 移除 action\n * @param action 移除的 action\n */\n removeAction(action: IAction);\n /**\n * 事件触发时是否在 view 内部\n */\n isInPlot();\n /**\n * 是否在组件的包围盒内\n * @param name 组件名,可省略\n */\n isInComponent(name?: string);\n /**\n * 是否在指定的图形内\n * @param name shape 的名称\n */\n isInShape(name);\n /**\n * 销毁\n */\n destroy();\n}\n\n/**\n * @title G 的渲染类型\n */\nexport type Renderer = 'svg' | 'canvas';\n/**\n * @title 数据的定义\n */\nexport type Datum = Record<string, any>;\nexport type Data = Datum[];\nexport type ActionCallback = (context: IInteractionContext) => void;\nexport type Padding = [number, number, number, number];\nexport type ViewPadding = number | number[] | 'auto';\nexport type ViewAppendPadding = number | number[];\nexport type Position = [number, number];\nexport type AttributeType = 'position' | 'size' | 'color' | 'shape';\nexport type ShapeVertices = RangePoint[] | Point[] | Point[][];\n/**\n * @title easing 的回调函数, 入参 data 为对应的原始数据记录\n */\nexport type AnimateEasingCallback = (data: Datum) => string;\n/**\n * @title delay 的回调函数, 入参 data 为对应的原始数据记录\n */\nexport type AnimateDelayCallback = (data: Datum) => number;\n/**\n * @title duration 的回调函数, 入参 data 为对应的原始数据记录\n */\nexport type AnimateDurationCallback = (data: Datum) => number;\n"]}
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import { COMPONENT_TYPE, DIRECTION, LAYER } from './constant';\nimport {\n AxisLabelCfg,\n AxisLineCfg,\n AxisSubTickLineCfg,\n AxisTickLineCfg,\n AxisTitleCfg,\n ContinueLegendHandlerCfg,\n ContinueLegendLabelCfg,\n ContinueLegendRailCfg,\n ContinueLegendTrackCfg,\n Coordinate,\n CrosshairLineCfg,\n CrosshairTextBackgroundCfg,\n CrosshairTextCfg,\n EnhancedTextCfg,\n GridLineCfg,\n GroupComponent,\n HtmlComponent,\n ICanvas,\n IGroup,\n IShape,\n CategoryLegendCfg,\n LegendBackgroundCfg,\n LegendItemNameCfg,\n LegendItemValueCfg,\n LegendMarkerCfg,\n LegendTitleCfg,\n LegendPageNavigatorCfg,\n PathCommand,\n Scale,\n ScaleConfig,\n ShapeAttrs,\n LineAnnotationTextCfg,\n TrendCfg,\n} from './dependents';\n\nimport { View } from './chart';\nimport { Facet } from './facet';\nimport Element from './geometry/element';\nimport { PaddingCalCtor } from './chart/layout/padding-cal';\nimport { LegendRadio } from '@antv/component';\n\n// ============================ 基础类型 ============================\n/**\n * @title 通用对象\n */\nexport interface LooseObject {\n [key: string]: any;\n}\n\n/**\n * @title 一个点位置\n */\nexport interface Point {\n readonly x: number;\n readonly y: number;\n}\n\n/**\n * @title 画布范围\n */\nexport interface Region {\n readonly start: Point;\n readonly end: Point;\n}\n\n/**\n * @title 画布大小\n */\nexport interface Size {\n readonly width: number;\n readonly height: number;\n}\n\n/**\n * @title 带范围的点结构\n */\nexport interface RangePoint {\n readonly x?: number | number[];\n readonly y?: number | number[];\n}\n\n/**\n * WAI-ARIA 无障碍标签配置\n */\nexport type AriaOption =\n | false\n | {\n readonly label: string;\n };\n\n/**\n * @title 用户数据经过图形映射处理后的数据结构\n */\nexport interface MappingDatum {\n /**\n * @title 原始数据\n */\n _origin: Datum;\n /**\n * @title shape 的关键点信息\n */\n points?: ShapeVertices;\n /**\n * @title 相对于当前 shape 的下一个 shape 的关键点信息\n */\n nextPoints?: ShapeVertices;\n /**\n * @title x 轴的坐标\n */\n x?: number[] | number;\n /**\n * @title y 轴的坐标\n */\n y?: number[] | number;\n /**\n * @title 颜色\n */\n color?: string;\n /**\n * @title 渲染的 shape 类型\n */\n shape?: string | string[];\n /**\n * @title 大小\n */\n size?: number;\n}\n\n/**\n * @title 绘制 Shape 需要的图形、样式、关键点等信息\n */\nexport interface ShapeInfo {\n /**\n * @title x 坐标\n */\n x: number | number[];\n /**\n * @title y 坐标\n */\n y: number | number[];\n /**\n * @title 映射的 shape 类型\n */\n shape?: string | string[];\n /**\n * @title size 映射值\n */\n size?: number;\n /**\n * @title 映射的颜色值\n */\n color?: string;\n /**\n * @title 用户设置的图形样式\n */\n style?: LooseObject;\n /**\n * @title 是否在极坐标下\n */\n isInCircle?: boolean;\n /**\n * @title 对应的原始数据记录\n */\n data?: Datum | Data;\n /**\n * @title 存储进行图形映射后的数据\n */\n mappingData?: MappingDatum | MappingDatum[];\n /**\n * @title 构成 shape 的关键点\n */\n points?: ShapeVertices;\n /**\n * @title 下一个数据集对应的关键点\n */\n nextPoints?: ShapeVertices;\n /**\n * @title Geometry.Text 需要\n */\n text?: string;\n /**\n * @title 数据是否发生层叠\n */\n isStack?: boolean;\n /**\n * @title 是否连接空值,只对 Path Line Area 这三种 Geometry 生效。\n */\n connectNulls?: boolean;\n /**\n * @title shape 背景,只对 Interval Geometry 生效,目前只对 interval-rect shape 生效。\n */\n background?: {\n style?: ShapeAttrs;\n };\n /**\n * @title 是否展示单个孤立的数据点,只对 Path Line Area 这三种 Geometry 生效。\n */\n showSinglePoint?: boolean;\n /**\n * @title 默认的 shape 样式\n */\n defaultStyle?: LooseObject;\n /**\n * @title 自定义的数据,传入到 shapeInfo 中\n */\n customInfo?: CustomOption;\n}\n\n/**\n * @title 用户配置的动画,属性均可选\n */\nexport interface AnimateCfg {\n /**\n * @title 动画缓动函数\n */\n readonly easing?: string | AnimateEasingCallback;\n /**\n * @title 动画执行函数\n */\n readonly animation?: string;\n /**\n * @title 动画执行时间\n */\n readonly duration?: number | AnimateDurationCallback;\n /**\n * @title 动画延迟时间\n */\n readonly delay?: number | AnimateDelayCallback;\n /**\n * @title 动画执行结束后的回调函数\n */\n readonly callback?: () => any;\n /**\n * @title 动画是否重复\n */\n readonly repeat?: boolean;\n}\n\n/**\n * @title 传递给 G 的动画配置,duration 必须提供\n */\nexport interface GAnimateCfg {\n /**\n * @title 动画执行时间\n */\n readonly duration: number;\n /**\n * @title 动画缓动函数\n */\n readonly easing?: string;\n /**\n * @title 动画执行函数\n */\n readonly animation?: string;\n /**\n * @title 动画延迟时间\n */\n readonly delay?: number;\n /**\n * @title 动画执行结束后的回调函数\n */\n readonly callback?: () => any;\n /**\n * @title 动画是否重复\n */\n readonly repeat?: boolean;\n}\n\n// ============================ Geometry 接口相关的类型定义 ============================\n/**\n * @title 图形属性配置项定义,如 geometry.position({})\n */\nexport interface AttributeOption {\n /**\n * @title 映射的属性字段。\n */\n fields?: string[];\n /**\n * @title 回调函数。\n */\n callback?: (...args) => any;\n /**\n * @title 指定常量映射规则。\n */\n values?: any[];\n}\n\n/**\n * @title 数据调整配置项定义,`geometry.adjust({})`\n */\nexport interface AdjustOption {\n /**\n * @title 数据调整类型。\n */\n readonly type: AdjustType;\n /**\n * @title 间距\n * @description 该属性只对 'dodge' 类型生效,取 0 到 1 范围的值(相对于每个柱子宽度),用于控制一个分组中柱子之间的间距。\n * @see \n */\n readonly marginRatio?: number;\n /**\n * @title 分组字段\n * @description 该属性只对 'dodge' 类型生效,声明以哪个数据字段为分组依据。\n */\n readonly dodgeBy?: string;\n /**\n * @title 是否反序\n * @description 该属性只对 'stack' 类型生效,用于控制是否对数据进行反序操作。\n */\n readonly reverseOrder?: boolean;\n}\n\n/**\n * @title `geometry.style({})` 样式配置定义\n */\nexport interface StyleOption {\n /**\n * @title 映射的字段。\n */\n readonly fields?: string[];\n /**\n * @title 回调函数。\n */\n readonly callback?: (...args) => LooseObject;\n /**\n * @title 图形样式配置。\n */\n readonly cfg?: LooseObject;\n}\n\n/**\n * @title geometry.custom() custom 自定义的配置,可以传入任何数据\n */\nexport type CustomOption = any;\n\n/**\n * @title `geometry.tooltip({})` Tooltip 配置定义\n */\nexport interface GeometryTooltipOption {\n /**\n * @title 参与映射的字段。\n */\n readonly fields: string[];\n /**\n * @title 回调函数。\n */\n readonly callback?: (...args) => LooseObject;\n}\n\nexport interface GeometryLabelLayoutCfg {\n /**\n * @title label 布局类型。\n */\n type: string;\n /**\n * @title 各个布局函数开放给用户的配置。\n */\n cfg?: LooseObject;\n}\n\n/**\n * @title geometry.label({}) 配置属性\n */\nexport interface GeometryLabelCfg {\n /**\n * @title 类型\n * @description 用于声明渲染的 label 类型。当用户使用了自定义的 label 类型,需要声明具体的 type 类型,否则会使用默认的 label 类型渲染。\n */\n type?: string;\n /**\n * @title 相对数据点的偏移距离, polar 和 theta 坐标系下可使用百分比字符串。\n */\n offset?: number | string;\n /**\n * @title label 相对于数据点在 X 方向的偏移距离。\n */\n offsetX?: number;\n /**\n * @title label 相对于数据点在 Y 方向的偏移距离。\n */\n offsetY?: number;\n /**\n * @title 文本内容\n * @description 展示的文本内容,如果不声明则按照参与映射的第一字段的值进行显示。当 content 为 IGroup 或者 IShape 类型时,请使用相对定位,即 x 和 y 坐标都设为 0,G2 内部会整体做最后的 label 进行定位的。\n * @link 示例: https://g2.antv.vision/zh/examples/pie/basic#pie-custome-label\n */\n content?: string | IGroup | IShape | GeometryLabelContentCallback;\n /**\n * @title 文本样式\n * @description label 文本图形属性样式。\n */\n style?: LooseObject;\n /**\n * @title 是否自动旋转\n * @description label 是否自动旋转\n * @default true\n */\n autoRotate?: boolean;\n /**\n * @title 旋转\n * @description 当且仅当 `autoRotate` 为 false 时生效,用于设置文本的旋转角度,**弧度制**。\n */\n rotate?: number;\n /**\n * @title 标签高度\n * @description 标签高度设置,仅当标签类型 type 为 pie 时生效;也可在主题中设置 pieLabels.labelHeight\n */\n labelHeight?: number;\n /**\n * @title 文本连接线\n * @description 用于设置文本连接线的样式属性,null 表示不展示。\n */\n labelLine?: null | boolean | { style?: object };\n /**\n * @title 文本放射状\n * @description 只对极坐标下的文本生效,表示文本是否按照角度进行放射状显示,true 表示开启,false 表示关闭。\n */\n labelEmit?: boolean;\n /**\n * @title 文本布局\n * 文本布局类型,支持多种布局函数组合使用。\n *\n * 目前提供了三种:'overlap','fixedOverlap','limitInShape':\n * 1. overlap: label 防遮挡,为了防止 label 之间相互覆盖,通过尝试向**四周偏移**来剔除放不下的 label。\n * 2. fixed-overlap: 不改变 label 位置的情况下对相互重叠的 label 进行调整。\n * 3. limit-in-shape: 剔除 shape 容纳不了的 label。\n *\n * @example\n * ```ts\n * layout: {\n * type: 'overlap',\n * },\n * ```\n */\n layout?: GeometryLabelLayoutCfg | GeometryLabelLayoutCfg[];\n /**\n * @title 背景\n * @description 用于绘制 label 背景\n */\n background?: {\n /**\n * @title 背景框图形属性配置\n * - fill?: string; 背景框 填充色\n * - stroke?: string; 背景框 描边色\n * - lineWidth?: string; 背景框 描边宽度\n * - radius?: number | number[]; 背景框圆角,支持整数或数组形式\n */\n style?: ShapeAttrs;\n /**\n * @title 背景框 内边距\n */\n padding?: number | number[];\n };\n /**\n * @title 位置\n * @description 仅当 geometry 为 interval 时生效,指定当前 label 与当前图形的相对位置。\n */\n position?:\n | ((data: Datum, mappingData: MappingDatum, index: number) => IntervalGeometryLabelPosition)\n | IntervalGeometryLabelPosition;\n /**\n * @title 动画配置。\n */\n animate?: AnimateOption | false | null;\n}\n\n/**\n * @title `geometry().label({})` 配置定义\n */\nexport interface LabelOption {\n /**\n * @title 映射的字段。\n */\n fields?: string[];\n /**\n * @title 回调函数。\n */\n callback?: LabelCallback;\n cfg?: GeometryLabelCfg;\n}\n\n/**\n * @title Geometry 下每个 state 的配置结构\n */\nexport interface StateCfg {\n /**\n * @title 状态样式配置。\n */\n style?: object | StateStyleCallback;\n}\n\n/**\n * @title geometry.state({}) 配置定义\n */\nexport interface StateOption {\n /**\n * @title 默认状态样式。\n */\n default?: StateCfg;\n /**\n * @title active 状态配置。\n */\n active?: StateCfg;\n /**\n * @title inactive 状态配置。\n */\n inactive?: StateCfg;\n /**\n * @title selected 状态配置。\n */\n selected?: StateCfg;\n}\n\n/**\n * @title interval label 的位置\n */\nexport type IntervalGeometryLabelPosition = 'top' | 'bottom' | 'middle' | 'left' | 'right';\n/**\n * @title G2 提供的 adjust 类型\n */\nexport type AdjustType = 'stack' | 'jitter' | 'dodge' | 'symmetric';\n/**\n * @title geometry.color() 图形属性回调函数定义\n */\nexport type ColorAttrCallback = (...args) => string;\n/**\n * @title geometry.shape() 图形属性回调函数定义\n */\nexport type ShapeAttrCallback = (...args) => string | any[];\n/**\n * @title geometry.size() 图形属性回调函数定义\n */\nexport type SizeAttrCallback = (...args) => number;\n/**\n * @title geometry.tooltip() 接口回调函数定义\n */\nexport type TooltipCallback = (...args) => LooseObject;\n/**\n * @title geometry.style() 接口回调函数定义\n */\nexport type StyleCallback = (...args) => LooseObject;\n/**\n * @title geometry.label() 接口回调函数定义\n */\nexport type LabelCallback = (...args) => GeometryLabelCfg | null | undefined;\n/**\n * @title geometry label 中 content 属性的回调函数类型定义\n */\nexport type GeometryLabelContentCallback = (\n data: Datum,\n mappingData: MappingDatum,\n index: number\n) => string | IShape | IGroup;\n/**\n * @title state 下 style 回调函数定义\n */\nexport type StateStyleCallback = (element: Element) => LooseObject;\n\n// ============================ Geometry Shape 接口相关的类型定义 ============================\n/**\n * @title 获取 shape marker 时需要的信息\n */\nexport interface ShapeMarkerCfg {\n /**\n * @title 颜色。\n */\n color: string;\n /**\n * @title 是否是极坐标。\n */\n isInPolar: boolean;\n}\n\n/**\n * @title 图形 marker 的配置信息。\n */\nexport interface ShapeMarkerAttrs {\n /**\n * @title marker 的形状。\n */\n symbol: string | ShapeMarkerSymbol;\n /**\n * @title marker 样式\n * @description\n * marker 的样式,`ShapeAttrs` 属性结构如下:\n *\n * ```ts\n * {\n * // x 坐标\n * x?: number;\n * // y 坐标\n * y?: number;\n * // 圆半径\n * r?: number;\n * // 描边颜色\n * stroke?: string | null;\n * // 描边透明度\n * strokeOpacity?: number;\n * // 填充颜色\n * fill?: string | null;\n * // 填充透明度\n * fillOpacity?: number;\n * // 整体透明度\n * opacity?: number;\n * // 线宽\n * lineWidth?: number;\n * // 指定如何绘制每一条线段末端\n * lineCap?: 'butt' | 'round' | 'square';\n * // 用来设置2个长度不为0的相连部分(线段,圆弧,曲线)如何连接在一起的属性(长度为0的变形部分,其指定的末端和控制点在同一位置,会被忽略)\n * lineJoin?: 'bevel' | 'round' | 'miter';\n * // 设置线的虚线样式,可以指定一个数组。一组描述交替绘制线段和间距(坐标空间单位)长度的数字。 如果数组元素的数量是奇数,数组的元素会被复制并重复。例如, [5, 15, 25] 会变成 [5, 15, 25, 5, 15, 25]。这个属性取决于浏览器是否支持 setLineDash() 函数。\n * lineDash?: number[] | null;\n * // Path 路径\n * path?: string | object[];\n * // 图形坐标点\n * points?: object[];\n * // 宽度\n * width?: number;\n * // 高度\n * height?: number;\n * // 阴影模糊效果程度\n * shadowBlur?: number;\n * // 阴影颜色\n * shadowColor?: string | null;\n * // 阴影 x 方向偏移量\n * shadowOffsetX?: number;\n * // 阴影 y 方向偏移量\n * shadowOffsetY?: number;\n * // 设置文本内容的当前对齐方式\n * textAlign?: 'start' | 'center' | 'end' | 'left' | 'right';\n * // 设置在绘制文本时使用的当前文本基线\n * textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';\n * // 字体样式\n * fontStyle?: 'normal' | 'italic' | 'oblique';\n * // 文本字体大小\n * fontSize?: number;\n * // 文本字体\n * fontFamily?: string;\n * // 文本粗细\n * fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number;\n * // 字体变体\n * fontVariant?: 'normal' | 'small-caps' | string;\n * // 文本行高\n * lineHeight?: number;\n * [key: string]: any;\n * }\n * ```\n *\n * @link https://github.com/antvis/g/blob/28e3178b616573e0fa6d59694f1aaca2baaa9766/packages/g-base/src/types.ts#L37|ShapeAttrs\n */\n style: ShapeAttrs;\n}\n\n/**\n * @title shape 关键点信息\n */\nexport interface ShapePoint {\n /**\n * @title 数据点映射后对应 x 的值。\n */\n readonly x: number | number[];\n /**\n * @title 数据点映射后对应 y 的值。\n */\n readonly y?: number | number[];\n /**\n * @title 数据在 y 方向的最小值。\n */\n readonly y0?: number;\n /**\n * @title 大小\n */\n size?: number;\n}\n\n/**\n * @title 小提琴图 shape 关键点信息\n */\nexport type ViolinShapePoint = ShapePoint & { _size?: number[] };\n\n/**\n * @title 注册 ShapeFactory 需要实现的接口。\n */\nexport interface RegisterShapeFactory {\n /**\n * @title 默认的 shape 类型。\n */\n readonly defaultShapeType: string;\n /**\n * @title 返回绘制 shape 所有的关键点集合。\n */\n readonly getDefaultPoints?: (pointInfo: ShapePoint) => Point[];\n /**\n * @title 获取 shape 的默认绘制样式\n */\n readonly getDefaultStyle?: (geometryTheme: LooseObject) => LooseObject;\n /**\n * @title 获取 shape 对应的缩略图配置。\n */\n readonly getMarker?: (shapeType: string, markerCfg: ShapeMarkerCfg) => ShapeMarkerAttrs;\n /**\n * @title 创建具体的 G.Shape 实例。\n */\n readonly drawShape?: (shapeType: string, cfg: ShapeInfo, container: IGroup) => IShape | IGroup;\n}\n\n/**\n * @title 注册具体 shape 需要实现的接口。\n */\nexport interface RegisterShape {\n /**\n * @title 计算绘制需要的关键点,在注册具体的 shape 时由开发者自己定义。\n */\n readonly getPoints?: (pointInfo: ShapePoint) => Point[];\n /**\n * @title 获取 shape 对应的缩略图样式配置,在注册具体的 shape 时由开发者自己定义。\n */\n readonly getMarker?: (markerCfg: ShapeMarkerCfg) => ShapeMarkerAttrs;\n /**\n * @title 绘制函数。\n */\n readonly draw: (cfg: ShapeInfo, container: IGroup) => IShape | IGroup | void;\n}\n\n/**\n * @title Shape 接口定义。\n */\nexport interface Shape extends RegisterShape {\n /**\n * @title 坐标系对象。\n */\n coordinate: Coordinate;\n /**\n * @title 工具函数,将 0~1 path 转化成实际画布 path。\n */\n parsePath: (path: any) => PathCommand[];\n /**\n * @title 工具函数,0~1 的坐标点转换成实际画布坐标点。\n */\n parsePoint: (point: Point) => Point;\n /**\n * @title 工具函数,0~1 的坐标点集合转换成实际画布坐标点集合。\n */\n parsePoints: (points: Point[]) => Point[];\n}\n\n/**\n * @title ShapeFactory 接口定义。\n */\nexport interface ShapeFactory extends RegisterShapeFactory {\n /**\n * @title 工厂名。\n */\n geometryType: string;\n /**\n * @title 坐标系对象。\n */\n coordinate: Coordinate;\n /**\n * @title ShapeFactory 下所有的主题样式。\n */\n theme: LooseObject;\n /**\n * @title 根据名称获取具体的 shape 对象。\n */\n getShape: (shapeType: string | string[]) => Shape;\n /**\n * @title 获取构成 shape 的关键点。\n */\n getShapePoints: (shapeType: string | string[], pointInfo: ShapePoint) => Point[];\n}\n\n/**\n * @title 自定义 Shape marker 的函数\n */\nexport type ShapeMarkerSymbol = (x: number, y: number, r: number) => PathCommand[];\n\n// ============================ Annotation 类型定义 ============================\n/**\n * @title Annotation position 回调函数\n */\nexport type AnnotationPositionCallback = (\n xScales: Scale[] | Record<string, Scale>,\n yScales: Scale[] | Record<string, Scale>\n) => [number | string, number | string];\n/**\n * @title Annotation 位置相关属性的类型定义\n */\nexport type AnnotationPosition =\n | [number | string, number | string]\n | Record<string, number | string>\n | AnnotationPositionCallback;\n\n/**\n * @title Annotation 定义的通用属性,chart.annotation().line({})\n */\nexport interface AnnotationBaseOption {\n /**\n * @title 类型\n */\n readonly type?: string;\n /**\n * @title 是否顶层\n * @description 指定 annotation 是否绘制在 canvas 最上层,默认为 false, 即绘制在最下层\n */\n readonly top?: boolean;\n /**\n * @title 是否进行动画\n */\n readonly animate?: boolean;\n /**\n * @title 动画参数配置\n * @description 当且仅当 `animate` 属性为 true,即动画开启时生效。\n */\n readonly animateOption?: ComponentAnimateOption;\n /**\n * @title x 方向的偏移量\n */\n readonly offsetX?: number;\n /**\n * @title y 方向的偏移量\n */\n readonly offsetY?: number;\n}\n\n/**\n * @title 使用 RegionPosition 定位的组件配置\n */\nexport interface RegionPositionBaseOption extends AnnotationBaseOption {\n /**\n * @title 起始位置\n */\n readonly start: AnnotationPosition;\n /**\n * @title 结束位置\n */\n readonly end: AnnotationPosition;\n /**\n * @title 图形样式属性\n */\n readonly style?: ShapeAttrs;\n}\n\n/**\n * @title 使用 PointPosition 定位的组件配置\n */\nexport interface PointPositionBaseOption extends AnnotationBaseOption {\n /**\n * @title Point 定位位置\n */\n readonly position: AnnotationPosition;\n}\n\n/**\n * @title 使用 Image Annotation 组件的配置定义\n */\nexport interface ImageOption extends RegionPositionBaseOption {\n /**\n * @title 图片路径\n */\n readonly src: string;\n}\n\n/**\n * @title 使用 Line Annotation 组件的配置定义\n */\nexport interface LineOption extends RegionPositionBaseOption {\n /**\n * @title 文本配置定义\n */\n readonly text?: LineAnnotationTextCfg;\n}\n/**\n * @title 使用 Arc Annotation 组件的配置定义\n */\nexport type ArcOption = RegionPositionBaseOption;\n/**\n * @title 使用 Region Annotation 组件的配置定义\n */\nexport type RegionOption = RegionPositionBaseOption;\n/**\n * @title 使用 Text Annotation 组件的配置定义\n */\nexport interface TextOption extends PointPositionBaseOption, Omit<EnhancedTextCfg, 'content'> {\n content?: string | number | ((filteredData: object[]) => string | number);\n}\n/**\n * @title 使用 DataMarker Annotation 组件的配置定义\n */\nexport interface DataMarkerOption extends PointPositionBaseOption {\n /**\n * @title point 设置\n */\n readonly point?: null | { style?: ShapeAttrs };\n /**\n * @title line 设置\n */\n readonly line?: null | { style?: ShapeAttrs; length?: number };\n /**\n * @title text 设置\n */\n readonly text: null | EnhancedTextCfg;\n /**\n * @title 文本超出绘制区域时,是否自动调节文本方向,默认为 true\n */\n readonly autoAdjust?: boolean;\n /**\n * @title 朝向,默认为 upward,可选值为 'upward' 或者 'downward'\n */\n readonly direction?: 'upward' | 'downward';\n}\n/**\n * @title 使用 DataRegion Annotation 组件的配置定义\n */\nexport interface DataRegionOption extends RegionPositionBaseOption {\n /**\n * @title line长度,default为 0\n */\n readonly lineLength?: number;\n /**\n * @title 标注区间的配置\n */\n readonly region?: null | { style?: ShapeAttrs };\n /**\n * @title 文本的配置\n */\n readonly text?: null | EnhancedTextCfg;\n}\n/**\n * @title 使用 RegionFilter Annotation 组件的配置定义\n */\nexport interface RegionFilterOption extends RegionPositionBaseOption {\n /**\n * @title 染色色值\n */\n readonly color: string;\n /**\n * @title 适用场景\n * @description 可选,设定regionFilter只对特定geom类型起作用,如apply:['area']\n */\n readonly apply?: string[];\n}\n\n/**\n * @title Shape Annotation 的配置\n */\nexport interface ShapeAnnotationOption extends AnnotationBaseOption {\n /**\n * @title 自定义 Annotation 绘制函数\n */\n render: (\n container: IGroup,\n view: View,\n helpers: { parsePosition: (position: [string | number, string | number] | Datum) => Point }\n ) => void;\n}\n\n/**\n * Html Annotation 配置\n */\nexport interface HtmlAnnotationOption extends PointPositionBaseOption {\n /**\n * @title 容器元素\n */\n container?: string | HTMLElement;\n /**\n * @title 自定义 HTML DOM 元素\n */\n html: string | HTMLElement | ((container: HTMLElement, view: View) => void | string | HTMLElement);\n /**\n * @title X 方向对齐\n */\n alignX?: 'left' | 'middle' | 'right';\n /**\n * @title Y 方向对齐\n */\n alignY?: 'top' | 'middle' | 'bottom';\n /**\n * @title X 方向偏移\n */\n offsetX?: number;\n /**\n * @title Y 方向偏移\n */\n offsetY?: number;\n}\n\n// ============================ Chart && View 上的类型定义 ============================\n/**\n * @title Tooltip 内容框的 css 样式定义\n */\nexport interface TooltipDomStyles {\n 'g2-tooltip'?: LooseObject;\n 'g2-tooltip-title'?: LooseObject;\n 'g2-tooltip-list'?: LooseObject;\n 'g2-tooltip-list-item'?: LooseObject;\n 'g2-tooltip-marker'?: LooseObject;\n 'g2-tooltip-value'?: LooseObject;\n 'g2-tooltip-name'?: LooseObject;\n}\n\n/**\n * @title 目前组件动画允许的参数配置\n */\nexport interface ComponentAnimateCfg {\n /**\n * @title 动画执行时间\n */\n readonly duration?: number;\n /**\n * @title 动画缓动函数\n */\n readonly easing?: string;\n /**\n * @title 动画延迟时间\n */\n readonly delay?: number;\n}\n/**\n * @title 组件各个动画类型配置\n */\nexport interface ComponentAnimateOption {\n /**\n * @title 初入场动画配置\n */\n appear?: ComponentAnimateCfg;\n /**\n * @title 更新动画配置\n */\n update?: ComponentAnimateCfg;\n /**\n * @title 更新后新入场的动画配置\n */\n enter?: ComponentAnimateCfg;\n /**\n * @title 离场动画配置\n */\n leave?: ComponentAnimateCfg;\n}\n\n/**\n * @title 列定义配置项\n */\nexport interface ScaleOption extends ScaleConfig {\n /**\n * @title 声明度量类型。\n */\n type?: ScaleType;\n /**\n * @title 同步 scale\n *\n * @example\n * ```ts\n * chart.scale({\n * x: { sync: true },\n * y: { sync: true },\n * x1: { sync: 'x1' },\n * x2: { sync: 'x1' },\n * });\n * ```\n *\n * 通过以上配置,我们会分别对 x 和 y 两个字段,x1 和 x2 两个字段进行同步度量操作。\n */\n sync?: boolean | string;\n /**\n * @title 是否显示最后的 tick\n * @description 只对 `type: 'cat'` 以及 `type: 'time-cat'` 的 scale 生效,强制显示最后的日期 tick。\n */\n showLast?: boolean;\n /**\n * @title 唯一 ID\n * @description\n * 用于声明使用数据记录中的哪些字段来组成一条数据的唯一 id(如有多个字段,则使用 '-' 连接)。\n * 数据 id 用于标识 Element 图形元素,应用于 Geometry 中的图形元素 Element 更新。\n * 默认 G2 内部会有一套 ID 生成规则,如果不能满足用户需求,用户既可以使用该属性配置 id。\n * @example\n * 下面的例子中,声明了将 'x' 和 'y' 字段的数值来作为每条数据记录的 id,即下面数据两条数据的 id 分别为:'1-23' 和 '2-2'。\n * ```ts\n * const data = [\n * { x: 1, y: 23, z: 'a' },\n * { x: 2, y: 2, z: 'b' },\n * ];\n *\n * chart.scale({\n * x: { key: true },\n * y: { key: true },\n * });\n * ```\n */\n key?: boolean;\n}\n\n/**\n * @title Geometry 动画参数配置。geometry.animate()\n */\nexport interface AnimateOption {\n /**\n * @title chart 初始化渲染时的入场动画,false/null 表示关闭入场动画。\n */\n appear?: AnimateCfg | false | null;\n /**\n * @title chart 发生更新时,新增元素的入场动画,false/null 表示关闭入场动画。\n */\n enter?: AnimateCfg | false | null;\n /**\n * @title 更新动画配置,false/null 表示关闭更新动画。\n */\n update?: AnimateCfg | false | null;\n /**\n * @title 销毁动画配置,false/null 表示关闭销毁动画。\n */\n leave?: AnimateCfg | false | null;\n}\n\n/**\n * @title 用于配置项式声明交互行为\n */\nexport interface InteractionOption {\n /**\n * @title 交互名称\n */\n type: string;\n /**\n * @title 交互配置\n */\n cfg?: LooseObject;\n}\n\n/**\n * @title 用于配置项式的 Geometry 创建方式\n */\nexport interface GeometryOption {\n /**\n * @title Geometry 的类型。\n */\n type?: 'interval' | 'line' | 'path' | 'point' | 'area' | 'polygon' | 'schema' | 'edge' | 'heatmap' | string;\n /**\n * @title position 通道映射规则,对应 `geometry.position()`。\n */\n position?: string | AttributeOption;\n /**\n * @title color 通道映射规则,对应 `geometry.color()`。\n */\n color?: string | AttributeOption;\n /**\n * @title shape 通道映射规则,对应 `geometry.shape()`。\n */\n shape?: string | AttributeOption;\n /**\n * @title size 通道映射规则,对应 `geometry.size()`。\n */\n size?: number | string | AttributeOption;\n /**\n * @title adjust 数据调整方式,对应 `geometry.adjust()`。\n */\n adjust?: string | string[] | AdjustOption | AdjustOption[];\n /**\n * @title style 样式配置,对应 `geometry.size()`。\n */\n style?: StyleOption | LooseObject;\n /**\n * @title tooltip 配置,对应 `geometry.tooltip()`。\n */\n tooltip?: GeometryTooltipOption | boolean | string;\n /**\n * @title Geometry 动画配置,对应 `geometry.animate()`。\n */\n animate?: AnimateOption | boolean;\n /**\n * @title Label 配置,对应 `geometry.label()`。\n */\n label?: LabelOption | false | string;\n /**\n * @title state 样式配置,对应 `geometry.state()`。\n */\n state?: StateOption;\n /**\n * @title 其他配置\n */\n cfg?: {\n /**\n * @title 是否对数据进行排序\n */\n sortable?: boolean;\n /**\n * @title 是否可见\n */\n visible?: boolean;\n /**\n * @title 是否连接空值,仅对 'line', 'area' 和 'path' 生效\n */\n connectNulls?: boolean;\n };\n}\n\n/**\n * @title 用于配置型式的 View 声明方式\n */\nexport interface ViewOption {\n /**\n * @title view 的唯一表示 ID\n */\n readonly id?: string;\n /**\n * @title view 的绘制范围,起始点为左上角。\n */\n readonly region?: Region;\n /**\n * 设置图表的内边距,使用方式参考 CSS 盒模型。\n * 下图黄色区域即为 padding 的范围。\n * \n *\n * @example\n * 1. padding: 20\n * 2. padding: [ 10, 30, 30 ]\n */\n readonly padding?: ViewPadding;\n /**\n * @title 设置主题。\n */\n readonly theme?: LooseObject | string;\n /**\n * @title 是否可见。\n */\n readonly visible?: boolean;\n /**\n * 图表组件、图形映射等相关的配置。\n */\n readonly options?: Options;\n}\n\n/**\n * @title Chart 构造方法的入参\n */\nexport interface ChartCfg\n extends Omit<ViewCfg, 'parent' | 'canvas' | 'foregroundGroup' | 'middleGroup' | 'backgroundGroup' | 'region'> {\n /**\n * @title 指定 chart 绘制的 DOM,可以传入 DOM id,也可以直接传入 dom 实例。\n */\n readonly container: string | HTMLElement;\n /**\n * @title 图表宽度。\n */\n readonly width?: number;\n /**\n * @title 图表高度。\n */\n readonly height?: number;\n /**\n * @title 否自适应容器宽高\n * @description\n * 图表是否自适应容器宽高,默认为 false,用户需要手动设置 width 和 height。当 `autoFit: true` 时,\n * 会自动取图表容器的宽高,如果用户设置了 height,那么会以用户设置的 height 为准。\n * @default false\n */\n readonly autoFit?: boolean;\n /**\n * @title 渲染引擎\n * @default \"canvas\"\n */\n readonly renderer?: Renderer;\n /**\n * @title 像素比\n * @description 设置设备像素比,默认取浏览器的值 `window.devicePixelRatio`。\n */\n readonly pixelRatio?: number;\n /**\n * @title 是否开启局部刷新\n * @default true\n */\n readonly localRefresh?: boolean;\n /**\n * @title 是否支持 CSS transform\n * @description 开启后图表的交互以及事件将在页面设置了 css transform 属性时生效,默认关闭。\n * @default false\n */\n readonly supportCSSTransform?: boolean;\n /**\n * @title 配置图表默认交互,仅支持字符串形式。\n */\n readonly defaultInteractions?: string[];\n}\n\nexport type SyncViewPaddingFn = (chart: View, views: View[], PC: PaddingCalCtor) => void;\n\n/**\n * @title View 构造参数\n */\nexport interface ViewCfg {\n /**\n * @title View id,可以由外部传入\n */\n readonly id?: string;\n /**\n * @title 当前 view 的父级 view。\n */\n readonly parent: View;\n /**\n * @title canvas 实例。\n */\n readonly canvas: ICanvas;\n /**\n * @title 前景层\n */\n readonly foregroundGroup: IGroup;\n /**\n * @title 中间层\n */\n readonly middleGroup: IGroup;\n /**\n * @title 背景层\n */\n readonly backgroundGroup: IGroup;\n /**\n * @title view 的绘制范围\n */\n readonly region?: Region;\n /**\n * @title 是否对超出坐标系范围的 Geometry 进行剪切\n */\n readonly limitInPlot?: boolean;\n /**\n * @title 内边距\n * @description 设置图表的内边距,使用方式参考 CSS 盒模型,下图黄色区域即为 padding 的范围。\n * @see \n * @example\n * 1. padding: 20\n * 2. padding: [ 10, 30, 30 ]\n */\n readonly padding?: ViewPadding;\n /**\n * @title 额外边距\n * @description 设置图表的内边距在padding的基础上增加appendPadding的调整。\n * @example\n * 1. padding: 20\n * 2. padding: [ 10, 30, 30 ]\n */\n readonly appendPadding?: ViewAppendPadding;\n /**\n * @title 是否同步子 view 的 padding\n * @description 是否同步子 view 的 padding,可以是 boolean / SyncViewPaddingFn\n * @example\n * view1 的 padding 10\n * view2 的 padding 20\n * 那么两个子 view 的 padding 统一变成最大的 20.\n *\n * 如果是 Funcion,则使用自定义的方式去计算子 view 的 padding,这个函数中去修改所有的 views autoPadding 值\n */\n readonly syncViewPadding?: boolean | SyncViewPaddingFn;\n /**\n * @title 主题\n * @description 设置 view 实例主题\n */\n readonly theme?: LooseObject | string;\n /**\n * @title 图表组件、图形映射等相关的配置。\n */\n readonly options?: Options;\n /**\n * @title 是否可见\n */\n readonly visible?: boolean;\n}\n\n/**\n * @ignore\n * 组件及布局的信息\n */\nexport interface ComponentOption {\n readonly id?: string;\n readonly component: GroupComponent | HtmlComponent;\n readonly layer: LAYER;\n direction: DIRECTION;\n readonly type: COMPONENT_TYPE;\n /* 其他的额外信息 */\n readonly extra?: any;\n}\n\n/**\n * @title Legend marker 的配置结构\n */\nexport interface MarkerCfg extends LegendMarkerCfg {\n /**\n * @title 配置图例 marker 的 symbol 形状。\n */\n symbol?: Marker | MarkerCallback;\n style?: ShapeAttrs | ((style: ShapeAttrs) => ShapeAttrs);\n}\n\n/**\n * @title Legend item 各个图例项的数据结构\n */\nexport interface LegendItem {\n /**\n * 唯一值,用于动画或者查找\n */\n id?: string;\n /**\n * @title 名称\n */\n name: string;\n /**\n * @title 值\n */\n value: any;\n /**\n * @title 图形标记\n */\n marker?: MarkerCfg | ((name: string, index: number, item: { name: string; value: string } & MarkerCfg) => MarkerCfg);\n /**\n * @title 初始是否处于未激活状态\n */\n unchecked?: boolean;\n}\n\nexport interface G2LegendTitleCfg extends LegendTitleCfg {\n /**\n * @title title 文本显示内容\n */\n text?: string;\n}\n\n/**\n * 图例项配置\n */\nexport interface LegendCfg extends Omit<CategoryLegendCfg, 'marker'> {\n /**\n * @title 是否为自定义图例\n * @description 当该属性为 true 时,需要声明 items 属性。\n */\n readonly custom?: boolean;\n /**\n * @title 布局\n * @description 布局方式: horizontal,vertical\n */\n layout?: 'horizontal' | 'vertical';\n /**\n * @title 图例标题配置\n * @description 默认不展示。\n * @example\n * 属性结构如下:\n *\n * ```ts\n * {\n * spacing?: number; // 标题同图例项的间距\n * style?: ShapeAttrs; // 文本样式配置项\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L639|LegendTitleCfg\n */\n title?: G2LegendTitleCfg;\n /**\n * @title 背景框配置项。\n * @example\n * 属性结构如下:\n *\n * ```ts\n * {\n * padding?: number | number[]; // 背景的留白\n * style?: ShapeAttrs; // 背景样式配置项\n * }\n * ```\n *\n * 详见 {@link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L652|LegendBackgroundCfg}\n */\n background?: LegendBackgroundCfg;\n /**\n * @title 图例的位置。\n */\n position?:\n | 'top'\n | 'top-left'\n | 'top-right'\n | 'right'\n | 'right-top'\n | 'right-bottom'\n | 'left'\n | 'left-top'\n | 'left-bottom'\n | 'bottom'\n | 'bottom-left'\n | 'bottom-right';\n /**\n * @title 动画开关,默认关闭。\n */\n animate?: boolean;\n /**\n * @title 动画\n * @description 动画参数配置,当且仅当 `animate` 属性为 true,即动画开启时生效。\n */\n animateOption?: ComponentAnimateOption;\n /**\n * @title 水平间距\n * @description **分类图例适用**,控制图例项水平方向的间距。\n */\n itemSpacing?: number;\n /**\n * @title 垂直间距\n * @description **分类图例适用**,控制图例项垂直方向的间距。\n */\n itemMarginBottom?: number;\n /**\n * @title 图例项的最大宽度\n * @description\n * **分类图例适用**,图例项的最大宽度,超出则自动缩略。\n * `maxItemWidth` 可以是像素值;\n * 也可以是相对值(取 0 到 1 范围的数值),代表占图表宽度的多少\n */\n maxItemWidth?: number;\n /**\n * @title 图例项的宽度\n * @description **分类图例适用**,图例项的宽度, 默认为 null,自动计算。\n */\n itemWidth?: number;\n /**\n * @title 图例项的高度\n * @description **分类图例适用**,图例的高度,默认为 null。\n */\n itemHeight?: number;\n /**\n * @title 图例项 name\n * @description\n * **分类图例适用**,图例项 name 文本的配置。\n * 属性结构如下:\n *\n * ```ts\n * {\n * spacing?: number; // 图例项 name 同后面 value 的间距\n * formatter?: (text: string, item: ListItem, index: number) => any; // 格式化文本函数\n * style?: ShapeAttrs; // 文本配置项\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L665|LegendItemNameCfg\n */\n itemName?: LegendItemNameCfg;\n /**\n * @title 图例项 value\n * @description\n * **分类图例适用**,图例项 value 附加值的配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * alignRight?: boolean; // 是否右对齐,默认为 false,仅当设置图例项宽度时生效\n * formatter?: (text: string, item: ListItem, index: number) => any; // 格式化文本函数\n * style?: ShapeAttrs; // 图例项附加值的配置\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L685|LegendItemValueCfg\n */\n itemValue?: LegendItemValueCfg;\n /**\n * @title 最大宽度\n * @description **分类图例适用**,图例项最大宽度设置。\n */\n maxWidth?: number;\n /**\n * @title 最大高度\n * @description **分类图例适用**,图例项最大高度设置。\n */\n maxHeight?: number;\n /**\n * @title 最大宽度比例\n * @description **分类图例适用**,图例项最大宽度比例(以 view 的 bbox 宽度为参照,默认 0.25)。\n */\n maxWidthRatio?: number;\n /**\n * @title 最大高度比例\n * @description **分类图例适用**,图例项最大高度比例(以 view 的 bbox 高度为参照,默认 0.25)。\n */\n maxHeightRatio?: number;\n /**\n * @title 图例项的 marker\n * @description **分类图例适用**,图例项的 marker 图标的配置。\n */\n marker?: MarkerCfg | ((name: string, index: number, item: { name: string; value: string } & MarkerCfg) => MarkerCfg);\n /**\n * @title 是否进行分页\n * @description **适用于分类图例**,当图例项过多时是否进行分页。\n */\n flipPage?: boolean;\n /**\n * @title 分页器的样式\n * @description **适用于分类图例**,图例分页器的样式设置。\n */\n pageNavigator?: LegendPageNavigatorCfg;\n /**\n * @title 图例项\n * @description **分类图例适用**,用户自己配置图例项的内容。\n */\n items?: LegendItem[];\n /**\n * @title 反选\n * @description **分类图里适用**,用来配置正反选功能\n */\n radio?: LegendRadio;\n /**\n * @title 是否逆序\n * @description **分类图例适用**,是否将图例项逆序展示。\n */\n reversed?: boolean;\n\n /**\n * @title 最小值\n * @description **连续图例适用**,选择范围的最小值。\n */\n min?: number;\n /**\n * @title 最大\n * @description **连续图例适用**,选择范围的最大值。\n */\n max?: number;\n /**\n * @title value\n * @description **连续图例适用**,选择的值。\n */\n value?: number[];\n /**\n * @title 色块样式\n * @description\n * **连续图例适用**,选择范围的色块样式配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 选定范围的样式\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L574|ContinueLegendTrackCfg\n */\n track?: ContinueLegendTrackCfg;\n /**\n * @title 滑轨(背景\n * @description\n * **连续图例适用**,图例滑轨(背景)的样式配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * type?: string; // rail 的类型,color, size\n * size?: number; // 滑轨的宽度\n * defaultLength?: number; // 滑轨的默认长度,,当限制了 maxWidth,maxHeight 时,不会使用这个属性会自动计算长度\n * style?: ShapeAttrs; // 滑轨的样式\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L595|ContinueLegendRailCfg\n */\n rail?: ContinueLegendRailCfg;\n /**\n * @title 文本\n * @description\n * **连续图例适用**,文本的配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * // 文本同滑轨的对齐方式,有五种类型\n * // rail : 同滑轨对齐,在滑轨的两端\n * // top, bottom: 图例水平布局时有效\n * // left, right: 图例垂直布局时有效\n * align?: string;\n * spacing?: number; // 文本同滑轨的距离\n * style?: ShapeAttrs; // 文本样式\n * }\n * ```\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L618|ContinueLegendLabelCfg\n */\n label?: ContinueLegendLabelCfg;\n /**\n * @title 滑块\n * @description\n * **连续图例适用**,滑块的配置项。\n * 属性结构如下:\n *\n * ```ts\n * {\n * size?: number; // 滑块的大小\n * style?: ShapeAttrs; // 滑块的样式设置\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L582|ContinueLegendTrackCfg\n */\n handler?: ContinueLegendHandlerCfg;\n /**\n * @title 是否可滑动\n * @description **连续图例适用**,滑块是否可以滑动。\n */\n slidable?: boolean;\n /**\n * @title 图例 x 方向的偏移。\n */\n offsetX?: number;\n /**\n * @title 图例 y 方向的偏移。\n */\n offsetY?: number;\n /**\n * @title 图例在四个方向的偏移量\n */\n padding?: number[];\n /**\n * 图例高亮状态,false 表示默认置灰,无或 true 表示高亮\n */\n selected?: {\n [key: string]: boolean;\n };\n}\n\n/**\n * Tooltip Crosshairs 的文本数据结构。\n */\nexport interface TooltipCrosshairsText extends CrosshairTextCfg {\n /**\n * @title crosshairs 文本内容\n */\n content?: string;\n}\n\n/**\n * 辅助线文本回调函数\n * @param type 对应当前 crosshairs 的类型,值为 'x' 或者 'y'\n * @param defaultContent 对应当前 crosshairs 默认的文本内容\n * @param items 对应当前 tooltip 内容框中的数据\n * @param currentPoint 对应当前坐标点\n * @returns 返回当前 crosshairs 对应的辅助线文本配置\n */\nexport type TooltipCrosshairsTextCallback = (\n type: string,\n defaultContent: any,\n items: any[],\n currentPoint: Point\n) => TooltipCrosshairsText;\n/**\n * @title Tooltip crosshairs 配置结构\n */\nexport interface TooltipCrosshairs {\n /**\n * @title 类型\n * @description\n * crosshairs 的类型: `x` 表示 x 轴上的辅助线,`y` 表示 y 轴上的辅助项。\n * 以下是在不同坐标系下,crosshairs 各个类型的表现:\n *\n * | 坐标系 | type = 'x' | type = 'xy' | type = 'y' |\n * | ------------ | ------------- | ------------- |\n * | 直角坐标系 |  |  |  |\n * | 极坐标 |  |  |  |\n */\n type?: 'x' | 'y' | 'xy';\n /**\n * @title 辅助线的样式配置。\n * @description\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 线的样式配置\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L1177|CrosshairLineCfg\n */\n line?: CrosshairLineCfg;\n /**\n * @title 文本\n * @description 辅助线文本配置,支持回调。\n */\n text?: TooltipCrosshairsText | TooltipCrosshairsTextCallback;\n /**\n * @title 辅助线文本背景配置。\n * @description\n * 属性结构如下:\n *\n * ```ts\n * {\n * padding?: number | number[]; // 文本背景周围的留白\n * style?: ShapeAttrs; // 文本背景的样式\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L1185|CrosshairTextBackgroundCfg\n */\n textBackground?: CrosshairTextBackgroundCfg;\n /**\n * @title 辅助线是否跟随鼠标移动\n * @description 即定位到数据点\n * @default false\n */\n follow?: boolean;\n}\n\nexport type TooltipTitle = string | ((title: string, datum: Datum) => string);\n\nexport type TooltipItem = {\n /**\n * @title 原始数据\n */\n readonly data: Datum; // 原始数据\n /**\n * @title 映射之后的数据\n */\n readonly mappingData: Datum; // 映射后的数据\n /**\n * @title tooltip item 中名称\n */\n readonly name: string;\n /**\n * @title tooltip item 中值\n */\n readonly value: string | number;\n /**\n * @title tooltip item 中颜色\n */\n readonly color: string;\n /**\n * @title tooltip item 中图标类型\n */\n readonly marker: string;\n};\n\n/**\n * @title chart.tooltip() 接口配置属性\n */\nexport interface TooltipCfg {\n /**\n * @title 设置 tooltip 内容框是否跟随鼠标移动。\n * @description 默认为 true,跟随鼠标移动,false 则固定位置不随鼠标移动。\n * @default true\n */\n follow?: boolean;\n /**\n * @title tooltip 是否允许鼠标滑入\n * @default false\n */\n enterable?: boolean;\n /**\n * @title tooltip 显示延迟(ms)\n * @description 默认为 16ms,建议在 enterable = true 的时候才设置\n * @default \"16ms\"\n */\n showDelay?: number;\n /**\n * @title 是否展示 tooltip 标题。\n */\n showTitle?: boolean;\n /**\n * @title 标题\n * @description\n * 设置 tooltip 的标题内容:如果值为数据字段名,则会展示数据中对应该字段的数值,如果数据中不存在该字段,则直接展示 title 值。\n * 同时支持传入方法,回调的方式返回字符串\n */\n title?: TooltipTitle;\n /**\n * @title 设置 tooltip 的固定展示位置,相对于数据点。\n */\n position?: 'top' | 'bottom' | 'left' | 'right';\n /**\n * @title 是否合并当前点对应的所有数据\n * @description true 表示合并当前点对应的所有数据并展示,false 表示只展示离当前点最逼近的数据内容。\n */\n shared?: boolean; // 是否只展示单条数据\n /**\n * @title 是否展示 crosshairs。\n */\n showCrosshairs?: boolean;\n /**\n * @title 交叉线\n * @description 配置 tooltip 的 crosshairs,当且仅当 `showCrosshairs` 为 true 时生效。\n */\n crosshairs?: TooltipCrosshairs;\n /**\n * @title 是否渲染 tooltipMarkers。\n */\n showMarkers?: boolean;\n /**\n * @title tooltipMarker 的样式配置。\n */\n marker?: object;\n /**\n * @title 是否展示 tooltip 内容框\n */\n showContent?: boolean | ((datum: Datum) => boolean);\n /**\n * @title 自定义 tooltip 的容器。\n */\n container?: string | HTMLElement;\n /**\n * @title 图例容器的模板\n * @description 用于指定图例容器的模板,自定义模板时必须包含各个 dom 节点的 class。\n */\n containerTpl?: string;\n /**\n * @title 默认模板\n * @description 每项记录的默认模板,自定义模板时必须包含各个 dom 节点的 class。\n */\n itemTpl?: string;\n /**\n * @title dom 样式\n * @description 传入各个 dom 的样式。\n */\n domStyles?: TooltipDomStyles;\n /**\n * @title tooltip 偏移量。\n */\n offset?: number;\n /**\n * @title 是否将 tooltip items 逆序\n */\n reversed?: boolean;\n /**\n * @title 是否显示空值的 tooltip 项目\n */\n showNil?: boolean;\n /**\n * @description 在 tooltip 渲染之前,对最终的 items 进行自定义处理(比如排序、过滤、格式化等)\n */\n customItems?: (originalItems: TooltipItem[]) => TooltipItem[];\n /**\n * @title 自定义模板\n */\n customContent?: (title: string, data: any[]) => string | HTMLElement;\n}\n\n/**\n * @title 坐标系配置\n */\nexport interface CoordinateOption {\n /**\n * @title 坐标系类型\n */\n type?: 'polar' | 'theta' | 'rect' | 'cartesian' | 'helix';\n /**\n * @title 坐标系配置项,目前常用于极坐标。\n */\n cfg?: CoordinateCfg;\n /**\n * @title 坐标系变换\n * @description\n * 1. rotate 表示旋转,使用弧度制。\n * 2. scale 表示沿着 x 和 y 方向的缩放比率。\n * 3. reflect 表示沿 x 方向镜像或者沿 y 轴方向映射。\n * 4. transpose 表示 x,y 轴置换。\n */\n actions?: CoordinateActions[];\n}\n\n/**\n * @title 极坐标系支持的配置属性\n */\nexport interface CoordinateCfg {\n /**\n * @title 起始弧度\n * @description 用于极坐标,配置起始弧度。\n */\n startAngle?: number;\n /**\n * @title 结束弧度\n * @description 用于极坐标,配置结束弧度。\n */\n endAngle?: number;\n /**\n * @title 半径\n * @description 用于极坐标,配置极坐标半径,0 - 1 范围的数值。\n */\n radius?: number;\n /**\n * @title 内半径\n * @description 用于极坐标,极坐标内半径,0 -1 范围的数值。\n */\n innerRadius?: number;\n}\n\n/**\n * @title 坐标轴网格线的配置属性\n */\nexport interface AxisGridCfg {\n /**\n * @title 线的样式\n * @description\n * 属性结构如下:\n *\n * ```ts\n * {\n * type?: string; // 栅格线的类型,'line' 或者 'circle'\n * style?: ShapeAttrs; // 栅格线的样式配置项\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L407|GridLineCfg\n */\n line?: GridLineCfg;\n /**\n * @title 两个栅格线间的填充色。\n */\n alternateColor?: string | string[];\n /**\n * @title 是否关闭\n * @description 对于 circle 是否关闭 grid。\n */\n closed?: boolean;\n /**\n * @title 是否同刻度线对齐\n * @description 如果值为 false,则会显示在两个刻度中间。\n * @see \n */\n alignTick?: boolean;\n}\n\n/**\n * @title 坐标轴配置属性,chart.axis()\n */\nexport interface AxisCfg {\n /**\n * @title 是否渲染在画布顶层\n * @description 防止部分图形中,需要将 axis 显示在图形上面,避免被图形遮挡\n */\n top?: boolean;\n /**\n * @title 坐标轴的位置\n * @description 适用于直角坐标系,设置坐标轴的位置。\n */\n position?: 'top' | 'bottom' | 'right' | 'left';\n /**\n * @title 轴线\n * @description\n * 坐标轴线的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 坐标轴线的样式配置项\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L91|AxisLineCfg\n */\n line?: AxisLineCfg | null;\n /**\n * @title 刻度线线\n * @description\n * 坐标轴刻度线线的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 坐标轴刻度线的样式配置项\n * alignTick?: boolean; // 是否同 tick 对齐\n * length?: number; // 长度\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L103|AxisTickLineCfg\n */\n tickLine?: AxisTickLineCfg | null;\n /**\n * @title 子刻度线\n * @description\n * 坐标轴子刻度线的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * style?: ShapeAttrs; // 坐标轴刻度线的样式配置项\n * count?: number; // 子刻度个数\n * length?: number; // 子刻度线长度\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L169|AxisSubTickLineCfg\n */\n subTickLine?: AxisSubTickLineCfg | null;\n /**\n * @title 标题\n * @description\n * 标题的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * offset?: number; // 标题距离坐标轴的距离\n * style?: ShapeAttrs; // 标题文本配置项\n * autoRotate?: boolean; // 是否自动旋转\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L191|AxisTitleCfg\n */\n title?: AxisTitleCfg | null;\n /**\n * @title 文本标签\n * @description\n * 文本标签的配置项,null 表示不展示。\n * 属性结构如下:\n *\n * ```ts\n * {\n * // 坐标轴文本的样式\n * style?: ShapeAttrs;\n * // label 的偏移量\n * offset?: number;\n * // 文本旋转角度\n * rotate?: number;\n * // 格式化函数\n * formatter?: (text: string, item: ListItem, index: number) => any;\n * // 是否自动旋转,默认 false\n * autoRotate?: boolean | (isVertical: boolean, labelGroup: IGroup, limitLength?: number) => boolean; | string;\n * // 是否自动隐藏,默认 true\n * autoHide?: boolean | (isVertical: boolean, labelGroup: IGroup, limitLength?: number) => boolean; | string;\n * // 是否自动省略,默认 false\n * autoEllipsis?: boolean | (isVertical: boolean, labelGroup: IGroup, limitLength?: number) => boolean; | string;\n * }\n * ```\n *\n * @link https://github.com/antvis/component/blob/81890719a431b3f9088e0c31c4d5d382ef0089df/src/types.ts#L127|AxisLabelCfg\n */\n label?: AxisLabelCfg | null;\n /**\n * @title 网格线\n * @description 坐标轴网格线的配置项,null 表示不展示。\n */\n grid?: AxisGridCfg | null;\n /**\n * @title 动画\n * @default true\n */\n animate?: boolean;\n /**\n * @title 动画参数\n */\n animateOption?: ComponentAnimateOption;\n /**\n * @title 坐标轴 label 的方向\n * @description 标记坐标轴 label 的方向,左侧为 1,右侧为 -1。\n */\n verticalFactor?: number;\n /**\n * @title 坐标轴垂直方向的最大限制长度\n * @description\n * 配置坐标轴垂直方向的最大限制长度,对文本自适应有很大影响。\n * 1. 可以直接设置像素值,如 100;\n * 2. 也可设置绝对值,如 0.2,如果是 x 轴,则相对于图表的高度,如果是 y 轴,则相对于图表的宽度\n *\n * 在 G2 中,x 轴的文本默认最大高度为图表高度的 1/2,y 轴的文本默认最大长度为图表宽度的 1/3\n */\n verticalLimitLength?: number;\n}\n\nexport interface SliderCfg {\n /**\n * @title slider 高度\n */\n readonly height?: number;\n\n /**\n * @title 滑块背景区域配置\n */\n readonly trendCfg?: Omit<TrendCfg, 'data'> & { data?: number[] };\n /**\n * @title 滑块背景样式\n */\n readonly backgroundStyle?: any;\n /**\n * @title 滑块前景样式\n */\n readonly foregroundStyle?: any;\n /**\n * @title 滑块两个操作块样式\n */\n readonly handlerStyle?: any;\n /**\n * @title 文本样式\n */\n readonly textStyle?: any;\n /**\n * @title 允许滑动位置的最小值\n */\n readonly minLimit?: number;\n /**\n * @title 允许滑动位置的最大值\n */\n readonly maxLimit?: number;\n /**\n * @title 滑块初始化的起始位置\n */\n readonly start?: number;\n /**\n * @title 滑块初始化的结束位置\n */\n readonly end?: number;\n /**\n * @title 布局的 padding\n */\n readonly padding?: number[];\n /**\n * @title 滑块文本格式化函数\n */\n formatter?: (val: any, datum: Datum, idx: number) => any;\n}\n\n/**\n * 事件 payload\n */\nexport type EventPayload = LooseObject & {\n /**\n * @title 触发事件的来源\n */\n source?: string;\n};\n\nexport type EventCallback = (event: LooseObject) => void;\n/**\n * todo: 事件名可穷举,后续需要补充\n * 事件配置项\n */\nexport interface EventCfg {\n [key: string]: EventCallback;\n}\n\n/**\n * 缩略轴的配置项\n */\nexport type SliderOption = SliderCfg | boolean;\n\n/**\n * @title 滚动条组件配置项\n */\nexport interface ScrollbarCfg {\n /**\n * @title 滚动条类型,默认 horizontal\n */\n type?: 'horizontal' | 'vertical';\n /**\n * @title 宽度,在 vertical 下生效\n */\n width?: number;\n /**\n * @title 高度,在 horizontal 下生效\n */\n height?: number;\n /**\n * @title 可选 padding\n */\n padding?: Padding;\n /**\n * @title 对应水平滚动条,为 X 轴每个分类字段的宽度;对于垂直滚动条,为 X 轴每个分类字段的高度\n */\n categorySize?: number;\n /**\n * @title 滚动的时候是否开启动画,默认跟随 view 中 animate 配置\n */\n animate?: boolean;\n /**\n * @title 主题样式设置, 暂不提供 hover 高亮滑块样式配置\n */\n style?: {\n /**\n * @title 滑道颜色\n */\n trackColor?: string;\n /**\n * @title 滑块颜色\n */\n thumbColor?: string;\n /**\n * @title 滑块高亮样式,对应主题的 hover.style.thumbColor\n */\n thumbHighlightColor?: string;\n /**\n * @title 是否圆角\n */\n lineCap?: string;\n };\n}\n\n/**\n * @title 滚动条配置\n */\nexport type ScrollbarOption = ScrollbarCfg | boolean;\n\n/**\n * @title 配置项声明式\n */\nexport interface Options {\n /**\n * @title 数据源配置。\n */\n readonly data?: Data;\n /**\n * @title 设置数据过滤条件,以 data 中的数据属性为 key。\n */\n readonly filters?: Record<string, FilterCondition>;\n /**\n * @title 坐标轴配置,以 data 中的数据属性为 key。\n */\n readonly axes?: Record<string, AxisOption> | boolean;\n /**\n * @title 图例配置,以 data 中的数据属性为 key。\n */\n readonly legends?: AllLegendsOptions;\n /**\n * @title 列定义配置,用于配置数值的类型等,以 data 中的数据属性为 key。\n */\n readonly scales?: Record<string, ScaleOption>;\n /**\n * @title Tooltip 配置。\n */\n readonly tooltip?: TooltipOption;\n /**\n * @title 坐标系配置。\n */\n readonly coordinate?: CoordinateOption;\n /**\n * @title 静态辅助元素声明。\n */\n readonly annotations?: (\n | ArcOption\n | RegionFilterOption\n | ImageOption\n | LineOption\n | TextOption\n | RegionOption\n | DataMarkerOption\n | DataRegionOption\n )[];\n /**\n * @title Geometry 配置\n */\n readonly geometries?: GeometryOption[];\n /**\n * @title 开启/关闭动画,默认开启\n */\n readonly animate?: boolean;\n /**\n * @title 配置需要使用的交互行为\n */\n readonly interactions?: InteractionOption[];\n /**\n * @title 事件配置\n */\n readonly events?: EventCfg;\n\n /**\n * @title 缩略轴的配置\n */\n readonly slider?: SliderOption;\n\n /**\n * @title 滚动条配置\n */\n readonly scrollbar?: ScrollbarOption;\n\n /**\n * @title 子 View\n */\n readonly views?: ViewOption[];\n\n /**\n * @title 分面\n */\n readonly facets?: (RectCfg | MirrorCfg | CircleCfg | ListCfg | TreeCfg)[];\n\n /**\n * @title 其他自定义的 option\n */\n readonly [name: string]: any;\n}\n\n/**\n * @title 支持的 Marker 类型\n */\nexport type Marker =\n | 'circle'\n | 'square'\n | 'diamond'\n | 'triangle'\n | 'triangle-down'\n | 'hexagon'\n | 'bowtie'\n | 'cross'\n | 'tick'\n | 'plus'\n | 'hyphen'\n | 'line';\n/**\n * @title 自定义 Marker 的回调函数定义\n */\nexport type MarkerCallback = (x: number, y: number, r: number) => PathCommand[];\n/**\n * @title chart.tooltip() 参数类型\n */\nexport type TooltipOption = TooltipCfg | boolean;\n/* 筛选器函数类型定义 */\nexport type FilterCondition = (value: any, datum: Datum, idx?: number) => boolean;\n/**\n * @title chart.axis() 参数类型\n */\nexport type AxisOption = AxisCfg | boolean;\n/**\n * @title chart.legend() 参数类型\n */\nexport type LegendOption = LegendCfg | boolean;\n/**\n * @title Options 中 legends 的配置定义\n */\nexport type AllLegendsOptions = LegendCfg | Record<string, LegendOption> | boolean;\n/**\n * @title G2 支持的度量类型\n */\nexport type ScaleType =\n | 'linear'\n | 'cat'\n | 'category'\n | 'identity'\n | 'log'\n | 'pow'\n | 'time'\n | 'timeCat'\n | 'quantize'\n | 'quantile';\n\nexport type CoordinateRotate = ['rotate', number];\nexport type CoordinateReflect = ['reflect', 'x' | 'y'];\nexport type CoordinateScale = ['scale', number, number];\nexport type CoordinateTranspose = ['transpose'];\n/**\n * @title 坐标系支持的 action 配置\n */\nexport type CoordinateActions = CoordinateRotate | CoordinateReflect | CoordinateScale | CoordinateTranspose;\n\n// ============================ Facet 分面相关类型定义 ============================\n// 分面基类\nexport type FacetCtor = new (view: View, cfg: any) => Facet;\n\nexport interface Condition {\n readonly field: string;\n readonly value: any;\n readonly values: any[];\n}\n\nexport type FacetDataFilter = (data: Datum[]) => boolean;\n\n/**\n * 默认的基础配置\n */\nexport interface FacetCfg<D> {\n /**\n * @title 布局类型。\n */\n readonly type?: string;\n /**\n * @title view 创建回调。\n */\n readonly eachView: (innerView: View, facet?: D) => any;\n /**\n * @title 分面 view 之间的间隔, 百分比或像素值\n */\n readonly spacing?: [number | string, number | string];\n /**\n * @title facet view padding。\n */\n readonly padding?: ViewPadding;\n /**\n * @title 是否显示标题。\n */\n readonly showTitle?: boolean;\n /**\n * @title facet 数据划分维度。\n */\n readonly fields: string[];\n}\n\n/**\n * Facet title 配置项\n */\nexport interface FacetTitle {\n /**\n * @title x 方向偏移。\n */\n readonly offsetX?: number;\n /**\n * @title y 方向偏移。\n */\n readonly offsetY?: number;\n /**\n * @title 文本样式。\n */\n readonly style?: object;\n /**\n * @title 格式化\n */\n readonly formatter?: (val: any) => any;\n}\n\n/**\n * 分面数据\n */\nexport interface FacetData {\n /**\n * @title 分面类型。\n */\n readonly type: string;\n /**\n * @title 当前分面子 view 的数据。\n */\n readonly data: object[];\n /**\n * @title 当前分面子 view 的范围。\n */\n readonly region: Region;\n /**\n * @title 当前分面子 view 的 padding。\n */\n readonly padding?: number;\n /**\n * @title 当前 facet 对应生成的 view。\n */\n view?: View;\n\n // facet data\n /**\n * @title 分面行字段。\n */\n readonly rowField: string;\n /**\n * @title 分面列字段。\n */\n readonly columnField: string;\n /**\n * @title 当前行分面的枚举值。\n */\n readonly rowValue: string;\n /**\n * @title 当前列分面的枚举值。\n */\n readonly columnValue: string;\n /**\n * @title 当前行索引。\n */\n readonly rowIndex: number;\n /**\n * @title 当前列索引。\n */\n readonly columnIndex: number;\n /**\n * @title 当前行字段的枚举值长度。\n */\n readonly rowValuesLength: number;\n /**\n * @title 当前列字段的枚举值长度。\n */\n readonly columnValuesLength: number;\n}\n\n// ===================== rect 相关类型定义 =====================\n/**\n * @title rect 分面类型配置\n */\nexport interface RectCfg extends FacetCfg<RectData> {\n /**\n * @title 行标题的样式。\n */\n readonly columnTitle?: FacetTitle;\n /**\n * @title 列标题的样式。\n */\n readonly rowTitle?: FacetTitle;\n}\n\nexport type RectData = FacetData;\n\n// ===================== mirror 相关类型定义 =====================\n/**\n * @title mirror 分面类型配置\n */\nexport interface MirrorCfg extends FacetCfg<MirrorData> {\n /**\n * @title 是否转置。\n */\n readonly transpose?: boolean;\n /**\n * @title 标题样式。\n */\n readonly title?: FacetTitle;\n}\n\nexport type MirrorData = FacetData;\n\n// ===================== list 相关类型定义 =====================\n/**\n * @title list 分面类型配置\n */\nexport interface ListCfg extends FacetCfg<ListData> {\n /**\n * @title 指定每行可显示分面的个数,超出时会自动换行。\n */\n readonly cols?: number;\n /**\n * @title 每个分面标题配置。\n */\n readonly title?: FacetTitle;\n}\n\nexport interface ListData extends FacetData {\n readonly total?: number;\n}\n\n// ===================== matrix 相关类型定义 =====================\n/**\n * @title matrix 分面类型配置\n */\nexport interface MatrixCfg extends FacetCfg<MirrorData> {\n /**\n * @title 列标题的样式\n */\n readonly columnTitle?: FacetTitle;\n /**\n * @title 列标题的样式\n */\n readonly rowTitle?: FacetTitle;\n}\n\nexport type MatrixData = FacetData;\n\n// ===================== circle 相关类型定义 =====================\n/**\n * @title circle 分面类型配置\n */\nexport interface CircleCfg extends FacetCfg<CircleData> {\n /**\n * @title 分面标题配置。\n */\n readonly title?: FacetTitle;\n}\n\nexport type CircleData = FacetData;\n\n// ===================== tree 相关类型定义 =====================\n\nexport interface Line {\n readonly style?: ShapeAttrs;\n readonly smooth?: boolean;\n}\n/**\n * @title tree 分面类型配置\n */\nexport interface TreeCfg extends FacetCfg<TreeData> {\n readonly line?: Line;\n readonly title?: FacetTitle;\n}\n\nexport interface TreeData extends FacetData {\n children?: TreeData[];\n originColIndex?: number;\n}\n\n/**\n * facet object map\n */\nexport interface FacetCfgMap {\n /**\n * @title rect 类型分面配置\n */\n readonly rect: RectCfg;\n /**\n * @title mirror 类型分面配置\n */\n readonly mirror: MirrorCfg;\n /**\n * @title list 类型分面配置\n */\n readonly list: ListCfg;\n /**\n * @title matrix 类型分面配置\n */\n readonly matrix: MatrixCfg;\n /**\n * @title circle 类型分面配置\n */\n readonly circle: CircleCfg;\n /**\n * @title tree 类型分面配置\n */\n readonly tree: TreeCfg;\n}\n\n// ============================ 主题样式表定义 ============================\nexport interface StyleSheet {\n /**\n * @title 背景色\n */\n backgroundColor?: string;\n /**\n * @title 主题色\n */\n brandColor?: string;\n /**\n * @title 辅助色\n */\n subColor?: string;\n /**\n * @title 分类色板 1,在数据量小于等于 10 时使用\n */\n paletteQualitative10?: string[];\n /**\n * @title 分类色板 2,在数据量大于 10 时使用\n */\n paletteQualitative20?: string[];\n /**\n * @title 语义色\n */\n paletteSemanticRed?: string;\n /**\n * @title 语义色\n */\n paletteSemanticGreen?: string;\n /**\n * @title 语义色\n */\n paletteSemanticYellow?: string;\n /**\n * @title (单色)顺序色板\n */\n paletteSequence?: string[];\n /**\n * @title 字体\n */\n fontFamily?: string;\n\n // -------------------- 坐标轴 --------------------\n /**\n * @title 坐标轴线颜色\n */\n axisLineBorderColor?: string;\n /**\n * @title 坐标轴线粗细\n */\n axisLineBorder?: number;\n /**\n * @title 坐标轴线 lineDash 设置\n */\n axisLineDash?: number[];\n\n /**\n * @title 坐标轴标题颜色\n */\n axisTitleTextFillColor?: string;\n /**\n * @title 坐标轴标题文本字体大小\n */\n axisTitleTextFontSize?: number;\n /**\n * @title 坐标轴标题文本行高\n */\n axisTitleTextLineHeight?: number;\n /**\n * @title 坐标轴标题文本字体粗细\n */\n axisTitleTextFontWeight?: number | string;\n /**\n * @title 坐标轴标题距离坐标轴文本的间距\n */\n axisTitleSpacing?: number;\n /**\n * @title 坐标轴详细说明icon颜色\n */\n axisDescriptionIconFillColor?: string;\n /**\n * @title 坐标轴刻度线颜色\n */\n axisTickLineBorderColor?: string;\n /**\n * @title 坐标轴刻度线长度\n */\n axisTickLineLength?: number;\n /**\n * @title 坐标轴刻度线粗细\n */\n axisTickLineBorder?: number;\n\n /**\n * @title 坐标轴次刻度线颜色\n */\n axisSubTickLineBorderColor?: string;\n /**\n * @title 坐标轴次刻度线长度\n */\n axisSubTickLineLength?: number;\n /**\n * @title 坐标轴次刻度线粗细\n */\n axisSubTickLineBorder?: number;\n\n /**\n * @title 坐标轴刻度文本颜色\n */\n axisLabelFillColor?: string;\n /**\n * @title 坐标轴刻度文本字体大小\n */\n axisLabelFontSize?: number;\n /**\n * @title 坐标轴刻度文本行高\n */\n axisLabelLineHeight?: number;\n /**\n * @title 坐标轴刻度文本字体粗细\n */\n axisLabelFontWeight?: number | string;\n /**\n * @title 坐标轴刻度文本距离坐标轴线的间距\n */\n axisLabelOffset: number;\n\n /**\n * @title 坐标轴网格线颜色\n */\n axisGridBorderColor?: string;\n /**\n * @title 坐标轴网格线粗细\n */\n axisGridBorder?: number;\n /**\n * @title 坐标轴网格线虚线设置\n */\n axisGridLineDash?: number[];\n\n // -------------------- 图例 --------------------\n /**\n * @title 图例标题颜色\n */\n legendTitleTextFillColor?: string;\n /**\n * @title 图例标题文本字体大小\n */\n legendTitleTextFontSize?: number;\n /**\n * @title 图例标题文本行高\n */\n legendTitleTextLineHeight?: number;\n /**\n * @title 图例标题文本字体粗细\n */\n legendTitleTextFontWeight?: number | string;\n\n /**\n * @title 图例 marker 颜色\n */\n legendMarkerColor?: string;\n /**\n * @title 图例 marker 距离图例文本的间距\n */\n legendMarkerSpacing?: number;\n /**\n * @title 图例 marker 默认半径大小\n */\n legendMarkerSize?: number;\n /**\n * @title 图例 'circle' marker 半径\n */\n legendCircleMarkerSize?: number;\n /**\n * @title 图例 'square' marker 半径\n */\n legendSquareMarkerSize?: number;\n /**\n * @title 图例 'line' marker 半径\n */\n legendLineMarkerSize?: number;\n\n /**\n * @title 图例项文本颜色\n */\n legendItemNameFillColor?: string;\n /**\n * @title 图例项文本字体大小\n */\n legendItemNameFontSize?: number;\n /**\n * @title 图例项文本行高\n */\n legendItemNameLineHeight?: number;\n /**\n * @title 图例项粗细\n */\n legendItemNameFontWeight?: number | string;\n /**\n * @title 图例项之间的水平间距\n */\n legendItemSpacing?: number;\n /**\n * @title 图例项垂直方向的间隔\n */\n legendItemMarginBottom?: number;\n /**\n * @title 图例与图表绘图区域的偏移距离\n */\n legendPadding?: number[];\n /**\n * @title 水平布局的图例与绘图区域偏移距离\n */\n legendHorizontalPadding?: number[];\n /**\n * @title 垂直布局的图例与绘图区域偏移距离\n */\n legendVerticalPadding?: number[];\n\n /**\n * @title 图例分页器 marker 大小\n */\n legendPageNavigatorMarkerSize: number;\n /**\n * @title 图例分页器 marker 非激活状态填充色\n */\n legendPageNavigatorMarkerInactiveFillColor: string;\n /**\n * @title 图例分页器 marker 非激活状态填充色透明度\n */\n legendPageNavigatorMarkerInactiveFillOpacity: number;\n /**\n * @title 图例分页器 marker 填充色\n */\n legendPageNavigatorMarkerFillColor: string;\n /**\n * @title 图例分页器 marker 填充色透明度\n */\n legendPageNavigatorMarkerFillOpacity: number;\n /**\n * @title 图例分页器文本颜色\n */\n legendPageNavigatorTextFillColor: string;\n /**\n * @title 图例分页器文本字体大小\n */\n legendPageNavigatorTextFontSize: number;\n\n /**\n * @title 连续图例滑块填充色\n */\n sliderRailFillColor?: string;\n /**\n * @title 连续图例滑块边框粗细\n */\n sliderRailBorder?: number;\n /**\n * @title 连续图例滑块边框颜色\n */\n sliderRailBorderColor?: string;\n /**\n * @title 连续图例滑块宽度\n */\n sliderRailWidth?: number;\n /**\n * @title 连续图例滑块高度\n */\n sliderRailHeight?: number;\n\n /**\n * @title 连续图例文本颜色\n */\n sliderLabelTextFillColor?: string;\n /**\n * @title 连续图例文本字体大小\n */\n sliderLabelTextFontSize?: number;\n /**\n * @title 连续图例文本行高\n */\n sliderLabelTextLineHeight?: number;\n /**\n * @title 连续图例文本字体粗细\n */\n sliderLabelTextFontWeight?: number | string;\n\n /**\n * @title 连续图例滑块颜色\n */\n sliderHandlerFillColor?: string;\n /**\n * @title 连续图例滑块宽度\n */\n sliderHandlerWidth?: number;\n /**\n * @title 连续图例滑块高度\n */\n sliderHandlerHeight?: number;\n /**\n * @title 连续图例滑块边框粗细\n */\n sliderHandlerBorder?: number;\n /**\n * @title 连续图例滑块边框颜色\n */\n sliderHandlerBorderColor?: string;\n\n // -------------------- Annotation,图形标注 --------------------\n /**\n * @title arc 图形标注描边颜色\n */\n annotationArcBorderColor?: string;\n /**\n * @title arc 图形标注粗细\n */\n annotationArcBorder?: number;\n\n /**\n * @title line 图形标注颜色\n */\n annotationLineBorderColor?: string;\n /**\n * @title line 图形标注粗细\n */\n annotationLineBorder?: number;\n /**\n * @title lube 图形标注的虚线间隔\n */\n annotationLineDash?: number[];\n\n /**\n * @title text 图形标注文本颜色\n */\n annotationTextFillColor?: string;\n /**\n * @title text 图形标注文本字体大小\n */\n annotationTextFontSize?: number;\n /**\n * @title text 图形标注文本行高\n */\n annotationTextLineHeight?: number;\n /**\n * @title text 图形标注文本字体粗细\n */\n annotationTextFontWeight?: number | string;\n\n /**\n * @title text 图形标注文本边框颜色\n */\n annotationTextBorderColor?: string;\n /**\n * @title text 图形标注文本边框粗细\n */\n annotationTextBorder?: number;\n\n /**\n * @title region 图形标注填充颜色\n */\n annotationRegionFillColor?: string;\n /**\n * @title region 图形标注填充颜色透明色\n */\n annotationRegionFillOpacity?: number;\n /**\n * @title region 图形标注描边粗细\n */\n annotationRegionBorder?: number;\n /**\n * @title region 图形标注描边颜色\n */\n annotationRegionBorderColor?: string;\n\n /**\n * @title dataMarker 图形标注的连接线长度\n */\n annotationDataMarkerLineLength?: number;\n\n // -------------------- Tooltip --------------------\n /**\n * @title tooltip crosshairs 辅助线颜色\n */\n tooltipCrosshairsBorderColor?: string;\n /**\n * @title tooltip crosshairs 辅助线粗细\n */\n tooltipCrosshairsBorder?: number;\n /**\n * @title tooltip crosshairs 辅助线虚线间隔\n */\n tooltipCrosshairsLineDash?: number[];\n\n /**\n * @title tooltip 内容框背景色\n */\n tooltipContainerFillColor?: string;\n /**\n * @title tooltip 内容框背景透明度\n */\n tooltipContainerFillOpacity?: number;\n /**\n * @title tooltip 内容框阴影\n */\n tooltipContainerShadow?: string;\n /**\n * @title tooltip 内容框圆角\n */\n tooltipContainerBorderRadius?: number;\n\n /**\n * @title tooltip 文本颜色\n */\n tooltipTextFillColor?: string;\n /**\n * @title tooltip 文本字体大小\n */\n tooltipTextFontSize?: number;\n /**\n * @title tooltip 文本行高\n */\n tooltipTextLineHeight?: number;\n /**\n * @title tooltip 文本字体粗细\n */\n tooltipTextFontWeight?: number | string;\n\n // -------------------- Geometry labels --------------------\n /**\n * @title Geometry label 文本颜色\n */\n labelFillColor?: string;\n /**\n * @title Geometry label 暗色文本颜色\n */\n labelFillColorDark?: string;\n /**\n * @title Geometry label 亮色文本颜色\n */\n labelFillColorLight?: string;\n /**\n * @title Geometry label 文本字体大小\n */\n labelFontSize?: number;\n /**\n * @title Geometry label 文本行高\n */\n labelLineHeight?: number;\n /**\n * @title Geometry label 文本字体粗细\n */\n labelFontWeight?: number | string;\n /**\n * @title Geometry label 文本描边颜色\n */\n labelBorderColor?: string;\n /**\n * @title Geometry label 文本描边粗细\n */\n labelBorder?: number;\n\n /**\n * @title Geometry innerLabel 文本颜色\n */\n innerLabelFillColor?: string;\n /**\n * @title Geometry innerLabel 文本字体大小\n */\n innerLabelFontSize?: number;\n /**\n * @title Geometry innerLabel 文本行高\n */\n innerLabelLineHeight?: number;\n /**\n * @title Geometry innerLabel 文本字体粗细\n */\n innerLabelFontWeight?: number | string;\n /**\n * @title Geometry innerLabel 文本描边颜色\n */\n innerLabelBorderColor?: string;\n /**\n * @title Geometry innerLabel 文本描边粗细\n */\n innerLabelBorder?: number;\n\n /**\n * @title Geometry overflowLabel 文本颜色\n */\n overflowLabelFillColor?: string;\n /**\n * @title Geometry overflowLabel 暗色文本颜色\n */\n overflowLabelFillColorDark?: string;\n /**\n * @title Geometry overflowLabel 亮色文本颜色\n */\n overflowLabelFillColorLight?: string;\n /**\n * @title Geometry overflowLabel 文本字体大小\n */\n overflowLabelFontSize?: number;\n /**\n * @title Geometry overflowLabel 文本行高\n */\n overflowLabelLineHeight?: number;\n /**\n * @title Geometry overflowLabel 文本字体粗细\n */\n overflowLabelFontWeight?: number | string;\n /**\n * @title Geometry overflowLabel 文本描边颜色\n */\n overflowLabelBorderColor?: string;\n /**\n * @title Geometry overflowLabel 文本描边粗细\n */\n overflowLabelBorder?: number;\n\n /**\n * @title Geometry label 文本连接线粗细\n */\n labelLineBorder?: number;\n /**\n * @title Geometry label 文本连接线颜色\n */\n labelLineBorderColor?: string;\n\n // -------------------- Slider 组件样式--------------------\n /**\n * @title slider 滑道高度\n */\n cSliderRailHieght?: number;\n /**\n * @title slider 滑道背景色\n */\n cSliderBackgroundFillColor?: string;\n /**\n * @title slider 滑道背景色透明度\n */\n cSliderBackgroundFillOpacity?: number;\n /**\n * @title slider 滑道前景色\n */\n cSliderForegroundFillColor?: string;\n /**\n * @title slider 滑道前景色透明度\n */\n cSliderForegroundFillOpacity?: number;\n\n // slider handlerStyle 手柄样式\n /**\n * @title slider 手柄高度\n */\n cSliderHandlerHeight?: number;\n /**\n * @title Slider 手柄宽度\n */\n cSliderHandlerWidth?: number;\n /**\n * @title Slider 手柄背景色\n */\n cSliderHandlerFillColor?: string;\n /**\n * @title Slider 手柄背景色透明度\n */\n cSliderHandlerFillOpacity?: number;\n /**\n * @title Slider 手柄高亮背景色\n */\n cSliderHandlerHighlightFillColor?: string;\n /**\n * @title Slider 手柄边框色\n */\n cSliderHandlerBorderColor?: string;\n /**\n * @title Slider 手柄边框粗细\n */\n cSliderHandlerBorder?: number;\n /**\n * @title Slider 手柄边框圆角\n */\n cSliderHandlerBorderRadius?: number;\n\n // slider textStyle 字体标签样式\n /**\n * @title Slider 字体标签颜色\n */\n cSliderTextFillColor?: string;\n /**\n * @title Slider 字体标签透明度\n */\n cSliderTextFillOpacity?: number;\n /**\n * @title Slider 字体标签大小\n */\n cSliderTextFontSize?: number;\n /**\n * @title Slider 字体标签行高\n */\n cSliderTextLineHeight?: number;\n /**\n * @title Slider 字体标签字重\n */\n cSliderTextFontWeight?: number | string;\n /**\n * @title Slider 字体标签描边色\n */\n cSliderTextBorderColor?: string;\n /**\n * @title Slider 字体标签描边粗细\n */\n cSliderTextBorder?: number;\n\n // -------------------- Scrollbar 组件样式--------------------\n /**\n * @title 滚动条 滚道填充色\n */\n scrollbarTrackFillColor?: string;\n /**\n * @title 滚动条 滑块填充色\n */\n scrollbarThumbFillColor?: string;\n /**\n * @title 滚动条 滑块高亮填充色\n */\n scrollbarThumbHighlightFillColor?: string;\n\n // -------------------- Geometry 图形样式--------------------\n /**\n * @title 点图的大小范围\n */\n pointSizeRange?: [number, number];\n /**\n * @title 点图填充颜色\n */\n pointFillColor?: string;\n /**\n * @title 点图填充颜色透明度\n */\n pointFillOpacity?: number;\n /**\n * @title 点图大小\n */\n pointSize?: number;\n /**\n * @title 点图描边粗细\n */\n pointBorder?: number;\n /**\n * @title 点图描边颜色\n */\n pointBorderColor?: string;\n /**\n * @title 点图描边透明度\n */\n pointBorderOpacity?: number;\n\n /**\n * @title 点图 active 状态下填充颜色\n */\n pointActiveFillColor?: string;\n /**\n * @title 点图 active 状态下填充颜色透明度\n */\n pointActiveFillOpacity?: number;\n /**\n * @title 点图 active 状态下大小\n */\n pointActiveSize?: number;\n /**\n * @title 点图 active 状态下描边粗细\n */\n pointActiveBorder?: number;\n /**\n * @title 点图 active 状态下描边颜色\n */\n pointActiveBorderColor?: string;\n /**\n * @title 点图 active 状态下描边透明度\n */\n pointActiveBorderOpacity?: number;\n\n /**\n * @title 点图 selected 状态下填充颜色\n */\n pointSelectedFillColor?: string;\n /**\n * @title 点图 selected 状态下填充颜色透明度\n */\n pointSelectedFillOpacity?: number;\n /**\n * @title 点图 selected 状态下大小\n */\n pointSelectedSize?: number;\n /**\n * @title 点图 selected 状态下描边粗细\n */\n pointSelectedBorder?: number;\n /**\n * @title 点图 selected 状态下描边颜色\n */\n pointSelectedBorderColor?: string;\n /**\n * @title 点图 selected 状态下描边透明度\n */\n pointSelectedBorderOpacity?: number;\n\n /**\n * @title 点图 inactive 状态下填充颜色\n */\n pointInactiveFillColor?: string;\n /**\n * @title 点图 inactive 状态下填充颜色透明度\n */\n pointInactiveFillOpacity?: number;\n /**\n * @title 点图 inactive 状态下大小\n */\n pointInactiveSize?: number;\n /**\n * @title 点图 inactive 状态下描边粗细\n */\n pointInactiveBorder?: number;\n /**\n * @title 点图 inactive 状态下描边颜色\n */\n pointInactiveBorderColor?: string;\n /**\n * @title 点图 inactive 状态下描边透明度\n */\n pointInactiveBorderOpacity?: number;\n\n /**\n * @title 描边点图大小\n */\n hollowPointSize?: number;\n /**\n * @title 描边点图描边粗细\n */\n hollowPointBorder?: number;\n /**\n * @title 描边点图描边颜色\n */\n hollowPointBorderColor?: string;\n /**\n * @title 描边点图描边透明度\n */\n hollowPointBorderOpacity?: number;\n /**\n * @title 描边点图填充颜色\n */\n hollowPointFillColor?: string;\n /**\n * @title 描边点图填充透明度\n */\n hollowPointFillOpacity?: number;\n\n /**\n * @title 点 描边 active 状态下大小\n */\n hollowPointActiveSize?: number;\n /**\n * @title 点 描边 active 状态下描边粗细\n */\n hollowPointActiveBorder?: number;\n /**\n * @title 点 描边 active 状态下描边颜色\n */\n hollowPointActiveBorderColor?: string;\n /**\n * @title 点 描边 active 状态下描边透明度\n */\n hollowPointActiveBorderOpacity?: number;\n\n /**\n * @title 点 描边 selected 状态下大小\n */\n hollowPointSelectedSize?: number;\n /**\n * @title 点 描边 selected 状态下描边粗细\n */\n hollowPointSelectedBorder?: number;\n /**\n * @title 点 描边 selected 状态下描边颜色\n */\n hollowPointSelectedBorderColor?: string;\n /**\n * @title 点 描边 selected 状态下描边透明度\n */\n hollowPointSelectedBorderOpacity?: number;\n\n /**\n * @title 点 描边 inactive 状态下大小\n */\n hollowPointInactiveSize?: number;\n /**\n * @title 点 描边 inactive 状态下描边粗细\n */\n hollowPointInactiveBorder?: number;\n /**\n * @title 点 描边 inactive 状态下描边颜色\n */\n hollowPointInactiveBorderColor?: string;\n /**\n * @title 点 描边 inactive 状态下描边透明度\n */\n hollowPointInactiveBorderOpacity?: number;\n\n /**\n * @title 线图粗细\n */\n lineBorder?: number;\n /**\n * @title 线图颜色\n */\n lineBorderColor?: string;\n /**\n * @title 线图透明度\n */\n lineBorderOpacity?: number;\n\n /**\n * @title 线图 active 状态下粗细\n */\n lineActiveBorder?: number;\n /**\n * @title 线图 active 状态下颜色\n */\n lineActiveBorderColor?: string;\n /**\n * @title 线图 active 状态下透明度\n */\n lineActiveBorderOpacity?: number;\n\n /**\n * @title 线图 selected 状态下粗细\n */\n lineSelectedBorder?: number;\n /**\n * @title 线图 selected 状态下颜色\n */\n lineSelectedBorderColor?: string;\n /**\n * @title 线图 selected 状态下透明度\n */\n lineSelectedBorderOpacity?: number;\n\n /**\n * @title 线图 inactive 状态下粗细\n */\n lineInactiveBorder?: number;\n /**\n * @title 线图 inactive 状态下颜色\n */\n lineInactiveBorderColor?: string;\n /**\n * @title 线图 inactive 状态下透明度\n */\n lineInactiveBorderOpacity?: number;\n\n areaBorder?: number;\n /**\n * @title area 边框颜色\n */\n areaBorderColor?: string;\n /**\n * @title area 边框透明度\n */\n areaBorderOpacity?: number;\n /**\n * @title area 填充颜色\n */\n areaFillColor?: string;\n /**\n * @title area 填充透明度\n */\n areaFillOpacity?: number;\n\n /**\n * @title area Active 状态下边框粗细\n */\n areaActiveBorder?: number;\n /**\n * @title area Active 状态下边框颜色\n */\n areaActiveBorderColor?: string;\n /**\n * @title area Active 状态下边框透明度\n */\n areaActiveBorderOpacity?: number;\n /**\n * @title area Active 状态下填充颜色\n */\n areaActiveFillColor?: string;\n /**\n * @title area Active 状态下填充透明度\n */\n areaActiveFillOpacity?: number;\n\n /**\n * @title area selected 状态下边框粗细\n */\n areaSelectedBorder?: number;\n /**\n * @title area selected 状态下边框颜色\n */\n areaSelectedBorderColor?: string;\n /**\n * @title area selected 状态下边框透明度\n */\n areaSelectedBorderOpacity?: number;\n /**\n * @title area selected 状态下填充颜色\n */\n areaSelectedFillColor?: string;\n /**\n * @title area selected 状态下填充透明度\n */\n areaSelectedFillOpacity?: number;\n\n /**\n * @title area inactive 状态下边框粗细\n */\n areaInactiveBorder?: number;\n /**\n * @title area inactive 状态下边框颜色\n */\n areaInactiveBorderColor?: string;\n /**\n * @title area inactive 状态下边框透明度\n */\n areaInactiveBorderOpacity?: number;\n /**\n * @title area inactive 状态下填充颜色\n */\n areaInactiveFillColor?: string;\n /**\n * @title area inactive 状态下填充透明度\n */\n areaInactiveFillOpacity?: number;\n\n /**\n * @title hollowArea 边框粗细\n */\n hollowAreaBorder?: number;\n /**\n * @title hollowArea 边框颜色\n */\n hollowAreaBorderColor?: string;\n /**\n * @title hollowArea 边框透明度\n */\n hollowAreaBorderOpacity?: number;\n\n /**\n * @title hollowArea Active 状态下边框粗细\n */\n hollowAreaActiveBorder?: number;\n /**\n * @title hollowArea Active 状态下边框颜色\n */\n hollowAreaActiveBorderColor?: string;\n /**\n * @title hollowArea Active 状态下边框透明度\n */\n hollowAreaActiveBorderOpacity?: number;\n\n /**\n * @title hollowArea selected 状态下边框粗细\n */\n hollowAreaSelectedBorder?: number;\n /**\n * @title hollowArea selected 状态下边框颜色\n */\n hollowAreaSelectedBorderColor?: string;\n /**\n * @title hollowArea selected 状态下边框透明度\n */\n hollowAreaSelectedBorderOpacity?: number;\n\n /**\n * @title hollowArea inactive 状态下边框粗细\n */\n hollowAreaInactiveBorder?: number;\n /**\n * @title hollowArea inactive 状态下边框颜色\n */\n hollowAreaInactiveBorderColor?: string;\n /**\n * @title hollowArea inactive 状态下边框透明度\n */\n hollowAreaInactiveBorderOpacity?: number;\n\n /**\n * @title interval 边框粗细\n */\n intervalBorder?: number;\n /**\n * @title interval 边框颜色\n */\n intervalBorderColor?: string;\n /**\n * @title interval 边框透明度\n */\n intervalBorderOpacity?: number;\n /**\n * @title interval 填充颜色\n */\n intervalFillColor?: string;\n /**\n * @title interval 填充透明度\n */\n intervalFillOpacity?: number;\n\n /**\n * @title interval active 状态下边框粗细\n */\n intervalActiveBorder?: number;\n /**\n * @title interval active 状态下边框颜色\n */\n intervalActiveBorderColor?: string;\n /**\n * @title interval active 状态下边框透明度\n */\n intervalActiveBorderOpacity?: number;\n /**\n * @title interval active 状态下填充颜色\n */\n intervalActiveFillColor?: string;\n /**\n * @title interval active 状态下填充透明度\n */\n intervalActiveFillOpacity?: number;\n\n /**\n * @title interval selected 状态下边框粗细\n */\n intervalSelectedBorder?: number;\n /**\n * @title interval selected 状态下边框颜色\n */\n intervalSelectedBorderColor?: string;\n /**\n * @title interval selected 状态下边框透明度\n */\n intervalSelectedBorderOpacity?: number;\n /**\n * @title interval selected 状态下填充颜色\n */\n intervalSelectedFillColor?: string;\n /**\n * @title interval selected 状态下填充透明度\n */\n intervalSelectedFillOpacity?: number;\n\n /**\n * @title interval inactive 状态下边框粗细\n */\n intervalInactiveBorder?: number;\n /**\n * @title interval inactive 状态下边框颜色\n */\n intervalInactiveBorderColor?: string;\n /**\n * @title interval inactive 状态下边框透明度\n */\n intervalInactiveBorderOpacity?: number;\n /**\n * @title interval inactive 状态下填充颜色\n */\n intervalInactiveFillColor?: string;\n /**\n * @title interval inactive 状态下填充透明度\n */\n intervalInactiveFillOpacity?: number;\n\n /**\n * @title hollowInterval 边框粗细\n */\n hollowIntervalBorder?: number;\n /**\n * @title hollowInterval 边框颜色\n */\n hollowIntervalBorderColor?: string;\n /**\n * @title hollowInterval 边框透明度\n */\n hollowIntervalBorderOpacity?: number;\n /**\n * @title hollowInterval 填充颜色\n */\n hollowIntervalFillColor?: string;\n /**\n * @title hollowInterval 填充透明度\n */\n hollowIntervalFillOpacity?: number;\n\n /**\n * @title hollowInterval active 状态下边框粗细\n */\n hollowIntervalActiveBorder?: number;\n /**\n * @title hollowInterval active 状态下边框颜色\n */\n hollowIntervalActiveBorderColor?: string;\n /**\n * @title hollowInterval active 状态下边框透明度\n */\n hollowIntervalActiveBorderOpacity?: number;\n\n /**\n * @title hollowInterval selected 状态下边框粗细\n */\n hollowIntervalSelectedBorder?: number;\n /**\n * @title hollowInterval selected 状态下边框颜色\n */\n hollowIntervalSelectedBorderColor?: string;\n /**\n * @title hollowInterval selected 状态下边框透明度\n */\n hollowIntervalSelectedBorderOpacity?: number;\n\n /**\n * @title hollowInterval inactive 状态下边框粗细\n */\n hollowIntervalInactiveBorder?: number;\n /**\n * @title hollowInterval inactive 状态下边框颜色\n */\n hollowIntervalInactiveBorderColor?: string;\n /**\n * @title hollowInterval inactive 状态下边框透明度\n */\n hollowIntervalInactiveBorderOpacity?: number;\n}\n\n/**\n * @title createTheme 主题样式表配置\n */\nexport type StyleSheetCfg = Partial<StyleSheet>;\n\n// ============================ 交互相关的类型定义 ============================\n/**\n * @title 交互反馈的定义\n */\nexport interface IAction {\n /**\n * 初始化\n */\n init();\n /**\n * 交互 action (反馈)的名称\n */\n name: string;\n /**\n * 上下文\n */\n context: IInteractionContext;\n /**\n * 销毁函数\n */\n destroy();\n}\n\n/**\n * @title 交互上下文的接口定义\n */\nexport interface IInteractionContext extends LooseObject {\n /**\n * @title 事件对象\n */\n event: LooseObject;\n /**\n * 当前的 view\n */\n view: View;\n /**\n * @title 交互相关的 Actions\n */\n actions: IAction[];\n /**\n * 缓存属性,用于上下文传递信息\n * @param key 键名\n * @param value 值\n */\n cache(key: string, value?: any);\n /**\n * 获取 action\n * @param name - action 的名称\n * @returns 指定 name 的 Action\n */\n getAction(name): IAction;\n /**\n * 获取当前的点\n * @returns 返回当前的点\n */\n getCurrentPoint(): Point;\n /**\n * 获取当前的图形\n */\n getCurrentShape(): IShape;\n /**\n * 添加 action\n * @param action 指定交互 action\n */\n addAction(action: IAction);\n /**\n * 移除 action\n * @param action 移除的 action\n */\n removeAction(action: IAction);\n /**\n * 事件触发时是否在 view 内部\n */\n isInPlot();\n /**\n * 是否在组件的包围盒内\n * @param name 组件名,可省略\n */\n isInComponent(name?: string);\n /**\n * 是否在指定的图形内\n * @param name shape 的名称\n */\n isInShape(name);\n /**\n * 销毁\n */\n destroy();\n}\n\n/**\n * @title G 的渲染类型\n */\nexport type Renderer = 'svg' | 'canvas';\n/**\n * @title 数据的定义\n */\nexport type Datum = Record<string, any>;\nexport type Data = Datum[];\nexport type ActionCallback = (context: IInteractionContext) => void;\nexport type Padding = [number, number, number, number];\nexport type ViewPadding = number | number[] | 'auto';\nexport type ViewAppendPadding = number | number[];\nexport type Position = [number, number];\nexport type AttributeType = 'position' | 'size' | 'color' | 'shape';\nexport type ShapeVertices = RangePoint[] | Point[] | Point[][];\n/**\n * @title easing 的回调函数, 入参 data 为对应的原始数据记录\n */\nexport type AnimateEasingCallback = (data: Datum) => string;\n/**\n * @title delay 的回调函数, 入参 data 为对应的原始数据记录\n */\nexport type AnimateDelayCallback = (data: Datum) => number;\n/**\n * @title duration 的回调函数, 入参 data 为对应的原始数据记录\n */\nexport type AnimateDurationCallback = (data: Datum) => number;\n"]}
|
|
@@ -18,6 +18,7 @@ export declare const createDarkStyleSheet: (cfg?: StyleSheetCfg) => {
|
|
|
18
18
|
axisTitleTextLineHeight: number;
|
|
19
19
|
axisTitleTextFontWeight: string | number;
|
|
20
20
|
axisTitleSpacing: number;
|
|
21
|
+
axisDescriptionIconFillColor: string;
|
|
21
22
|
axisTickLineBorderColor: string;
|
|
22
23
|
axisTickLineLength: number;
|
|
23
24
|
axisTickLineBorder: number;
|
|
@@ -289,6 +290,7 @@ export declare const antvDark: {
|
|
|
289
290
|
axisTitleTextLineHeight: number;
|
|
290
291
|
axisTitleTextFontWeight: string | number;
|
|
291
292
|
axisTitleSpacing: number;
|
|
293
|
+
axisDescriptionIconFillColor: string;
|
|
292
294
|
axisTickLineBorderColor: string;
|
|
293
295
|
axisTickLineLength: number;
|
|
294
296
|
axisTickLineBorder: number;
|
|
@@ -110,6 +110,8 @@ var createDarkStyleSheet = function (cfg) {
|
|
|
110
110
|
axisTitleTextFontWeight: 'normal',
|
|
111
111
|
/** 坐标轴标题距离坐标轴文本的间距 */
|
|
112
112
|
axisTitleSpacing: 12,
|
|
113
|
+
/** 坐标轴标题详细说明icon颜色 */
|
|
114
|
+
axisDescriptionIconFillColor: WHITE_COLORS[85],
|
|
113
115
|
/** 坐标轴刻度线颜色 */
|
|
114
116
|
axisTickLineBorderColor: BLACK_COLORS[25],
|
|
115
117
|
/** 坐标轴刻度线长度 */
|
|
@@ -495,7 +497,7 @@ var createDarkStyleSheet = function (cfg) {
|
|
|
495
497
|
/** hollowInterval inactive 状态下边框透明度 */
|
|
496
498
|
hollowIntervalInactiveBorderOpacity: 0.3,
|
|
497
499
|
};
|
|
498
|
-
return
|
|
500
|
+
return tslib_1.__assign(tslib_1.__assign({}, token), cfg);
|
|
499
501
|
};
|
|
500
502
|
exports.createDarkStyleSheet = createDarkStyleSheet;
|
|
501
503
|
exports.antvDark = (0, exports.createDarkStyleSheet)();
|