@visactor/vchart 1.13.3 → 1.13.4

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.
Files changed (136) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +134 -193
  3. package/build/index.js +134 -193
  4. package/build/index.min.js +1 -1
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/animation/spec.d.ts +9 -7
  7. package/cjs/animation/spec.js.map +1 -1
  8. package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
  9. package/cjs/component/axis/interface/common.js.map +1 -1
  10. package/cjs/component/axis/interface/spec.js.map +1 -1
  11. package/cjs/component/axis/mixin/util/break-data.js +3 -3
  12. package/cjs/component/axis/mixin/util/break-data.js.map +1 -1
  13. package/cjs/component/common/trigger/config.d.ts +2 -2
  14. package/cjs/component/common/trigger/config.js +2 -2
  15. package/cjs/component/common/trigger/config.js.map +1 -1
  16. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  17. package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
  18. package/cjs/component/label/interface.js.map +1 -1
  19. package/cjs/component/legend/continuous/interface.js.map +1 -1
  20. package/cjs/component/legend/interface.js.map +1 -1
  21. package/cjs/component/marker/interface.js.map +1 -1
  22. package/cjs/component/marker/mark-area/interface/spec.js.map +1 -1
  23. package/cjs/component/marker/mark-area/interface/theme.js.map +1 -1
  24. package/cjs/component/title/interface/spec.js.map +1 -1
  25. package/cjs/component/tooltip/interface/spec.js.map +1 -1
  26. package/cjs/component/tooltip/interface/theme.js.map +1 -1
  27. package/cjs/component/tooltip/tooltip.js +9 -7
  28. package/cjs/component/tooltip/tooltip.js.map +1 -1
  29. package/cjs/core/index.d.ts +1 -1
  30. package/cjs/core/index.js +1 -1
  31. package/cjs/core/index.js.map +1 -1
  32. package/cjs/interaction/interface.js.map +1 -1
  33. package/cjs/interaction/zoom/zoomable.js +13 -9
  34. package/cjs/interaction/zoom/zoomable.js.map +1 -1
  35. package/cjs/layout/interface.js.map +1 -1
  36. package/cjs/mark/interface/common.js.map +1 -1
  37. package/cjs/plugin/components/tooltip-handler/base.js +5 -1
  38. package/cjs/plugin/components/tooltip-handler/base.js.map +1 -1
  39. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +5 -6
  40. package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
  41. package/cjs/plugin/components/tooltip-handler/utils/style.d.ts +2 -1
  42. package/cjs/plugin/components/tooltip-handler/utils/style.js +13 -8
  43. package/cjs/plugin/components/tooltip-handler/utils/style.js.map +1 -1
  44. package/cjs/region/interface.js.map +1 -1
  45. package/cjs/region/region.js +3 -1
  46. package/cjs/region/region.js.map +1 -1
  47. package/cjs/series/area/interface.d.ts +3 -1
  48. package/cjs/series/area/interface.js.map +1 -1
  49. package/cjs/series/box-plot/interface.d.ts +1 -1
  50. package/cjs/series/box-plot/interface.js.map +1 -1
  51. package/cjs/series/circle-packing/interface.js.map +1 -1
  52. package/cjs/series/interface/common.js.map +1 -1
  53. package/cjs/series/map/interface.js.map +1 -1
  54. package/cjs/series/mixin/interface.js.map +1 -1
  55. package/cjs/series/polar/interface.js.map +1 -1
  56. package/cjs/series/progress/linear/interface.d.ts +1 -1
  57. package/cjs/series/progress/linear/interface.js.map +1 -1
  58. package/cjs/series/radar/interface.js.map +1 -1
  59. package/cjs/series/scatter/interface.js.map +1 -1
  60. package/cjs/series/word-cloud/base.js +4 -3
  61. package/cjs/series/word-cloud/base.js.map +1 -1
  62. package/cjs/series/word-cloud/interface.d.ts +1 -1
  63. package/cjs/series/word-cloud/interface.js.map +1 -1
  64. package/cjs/typings/layout.js.map +1 -1
  65. package/cjs/typings/spec/common.d.ts +18 -9
  66. package/cjs/typings/spec/common.js.map +1 -1
  67. package/cjs/typings/tooltip/line.js.map +1 -1
  68. package/cjs/typings/tooltip/shape.js.map +1 -1
  69. package/cjs/typings/tooltip/tooltip.js.map +1 -1
  70. package/cjs/typings/visual.js.map +1 -1
  71. package/esm/animation/spec.d.ts +9 -7
  72. package/esm/animation/spec.js.map +1 -1
  73. package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
  74. package/esm/component/axis/interface/common.js.map +1 -1
  75. package/esm/component/axis/interface/spec.js.map +1 -1
  76. package/esm/component/axis/mixin/util/break-data.js +3 -3
  77. package/esm/component/axis/mixin/util/break-data.js.map +1 -1
  78. package/esm/component/common/trigger/config.d.ts +2 -2
  79. package/esm/component/common/trigger/config.js +2 -2
  80. package/esm/component/common/trigger/config.js.map +1 -1
  81. package/esm/component/crosshair/interface/spec.js.map +1 -1
  82. package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
  83. package/esm/component/label/interface.js.map +1 -1
  84. package/esm/component/legend/continuous/interface.js.map +1 -1
  85. package/esm/component/legend/interface.js.map +1 -1
  86. package/esm/component/marker/interface.js.map +1 -1
  87. package/esm/component/marker/mark-area/interface/spec.js.map +1 -1
  88. package/esm/component/marker/mark-area/interface/theme.js.map +1 -1
  89. package/esm/component/title/interface/spec.js.map +1 -1
  90. package/esm/component/tooltip/interface/spec.js.map +1 -1
  91. package/esm/component/tooltip/interface/theme.js.map +1 -1
  92. package/esm/component/tooltip/tooltip.js +9 -7
  93. package/esm/component/tooltip/tooltip.js.map +1 -1
  94. package/esm/core/index.d.ts +1 -1
  95. package/esm/core/index.js +1 -1
  96. package/esm/core/index.js.map +1 -1
  97. package/esm/interaction/interface.js.map +1 -1
  98. package/esm/interaction/zoom/zoomable.js +13 -9
  99. package/esm/interaction/zoom/zoomable.js.map +1 -1
  100. package/esm/layout/interface.js.map +1 -1
  101. package/esm/mark/interface/common.js.map +1 -1
  102. package/esm/plugin/components/tooltip-handler/base.js +5 -1
  103. package/esm/plugin/components/tooltip-handler/base.js.map +1 -1
  104. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +5 -4
  105. package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
  106. package/esm/plugin/components/tooltip-handler/utils/style.d.ts +2 -1
  107. package/esm/plugin/components/tooltip-handler/utils/style.js +11 -6
  108. package/esm/plugin/components/tooltip-handler/utils/style.js.map +1 -1
  109. package/esm/region/interface.js.map +1 -1
  110. package/esm/region/region.js +3 -1
  111. package/esm/region/region.js.map +1 -1
  112. package/esm/series/area/interface.d.ts +3 -1
  113. package/esm/series/area/interface.js.map +1 -1
  114. package/esm/series/box-plot/interface.d.ts +1 -1
  115. package/esm/series/box-plot/interface.js.map +1 -1
  116. package/esm/series/circle-packing/interface.js.map +1 -1
  117. package/esm/series/interface/common.js.map +1 -1
  118. package/esm/series/map/interface.js.map +1 -1
  119. package/esm/series/mixin/interface.js.map +1 -1
  120. package/esm/series/polar/interface.js.map +1 -1
  121. package/esm/series/progress/linear/interface.d.ts +1 -1
  122. package/esm/series/progress/linear/interface.js.map +1 -1
  123. package/esm/series/radar/interface.js.map +1 -1
  124. package/esm/series/scatter/interface.js.map +1 -1
  125. package/esm/series/word-cloud/base.js +4 -3
  126. package/esm/series/word-cloud/base.js.map +1 -1
  127. package/esm/series/word-cloud/interface.d.ts +1 -1
  128. package/esm/series/word-cloud/interface.js.map +1 -1
  129. package/esm/typings/layout.js.map +1 -1
  130. package/esm/typings/spec/common.d.ts +18 -9
  131. package/esm/typings/spec/common.js.map +1 -1
  132. package/esm/typings/tooltip/line.js.map +1 -1
  133. package/esm/typings/tooltip/shape.js.map +1 -1
  134. package/esm/typings/tooltip/tooltip.js.map +1 -1
  135. package/esm/typings/visual.js.map +1 -1
  136. package/package.json +15 -15
@@ -10,7 +10,7 @@ export function getDefaultTriggerEventByMode(mode) {
10
10
  return mode === RenderModeEnum["desktop-browser"] || mode === RenderModeEnum["desktop-miniApp"] ? {
11
11
  start: "pointerdown",
12
12
  move: "pointermove",
13
- end: "pointerup",
13
+ end: [ "pointerup", "pointerupoutside" ],
14
14
  zoom: "wheel",
15
15
  zoomEnd: "pointerup",
16
16
  scroll: "wheel",
@@ -18,7 +18,7 @@ export function getDefaultTriggerEventByMode(mode) {
18
18
  } : isMobileLikeMode(mode) || isMiniAppLikeMode(mode) ? {
19
19
  start: "pointerdown",
20
20
  move: "pointermove",
21
- end: "pointerup",
21
+ end: [ "pointerup", "pointerupoutside" ],
22
22
  zoom: "pinch",
23
23
  zoomEnd: "pinchend",
24
24
  scroll: "pan",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/common/trigger/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,4BAA4B,CAAC,IAAgB;IAC3D,IAAI,IAAI,KAAK,cAAc,CAAC,iBAAiB,CAAC,IAAI,IAAI,KAAK,cAAc,CAAC,iBAAiB,CAAC,EAAE;QAC5F,OAAO;YACL,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,WAAW;YAChB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,OAAO;YAEf,OAAO,EAAE,cAAc;SACxB,CAAC;KACH;IAED,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACrD,OAAO;YACL,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,WAAW;YAChB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,UAAU;YACnB,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,aAAa;SACvB,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC","file":"config.js","sourcesContent":["import type { RenderMode } from '../../../typings/spec';\n// eslint-disable-next-line no-duplicate-imports\nimport { RenderModeEnum } from '../../../typings/spec/common';\nimport { isMiniAppLikeMode, isMobileLikeMode } from '../../../util/env';\nimport { DeskTopTrigger } from './desktop';\nimport { MobileTrigger } from './mobile';\n\nexport function getDefaultTriggerEventByMode(mode: RenderMode) {\n if (mode === RenderModeEnum['desktop-browser'] || mode === RenderModeEnum['desktop-miniApp']) {\n return {\n start: 'pointerdown',\n move: 'pointermove',\n end: 'pointerup',\n zoom: 'wheel',\n zoomEnd: 'pointerup',\n scroll: 'wheel',\n // scrollEnd: 'pointerup',\n trigger: DeskTopTrigger\n };\n }\n\n if (isMobileLikeMode(mode) || isMiniAppLikeMode(mode)) {\n return {\n start: 'pointerdown',\n move: 'pointermove',\n end: 'pointerup',\n zoom: 'pinch',\n zoomEnd: 'pinchend',\n scroll: 'pan',\n scrollEnd: 'panend',\n trigger: MobileTrigger\n };\n }\n\n return null;\n}\n"]}
1
+ {"version":3,"sources":["../src/component/common/trigger/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,4BAA4B,CAAC,IAAgB;IAC3D,IAAI,IAAI,KAAK,cAAc,CAAC,iBAAiB,CAAC,IAAI,IAAI,KAAK,cAAc,CAAC,iBAAiB,CAAC,EAAE;QAC5F,OAAO;YACL,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,CAAC,WAAW,EAAE,kBAAkB,CAAC;YACtC,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,OAAO;YAEf,OAAO,EAAE,cAAc;SACxB,CAAC;KACH;IAED,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACrD,OAAO;YACL,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,CAAC,WAAW,EAAE,kBAAkB,CAAC;YACtC,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,UAAU;YACnB,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,aAAa;SACvB,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC","file":"config.js","sourcesContent":["import type { RenderMode } from '../../../typings/spec';\n// eslint-disable-next-line no-duplicate-imports\nimport { RenderModeEnum } from '../../../typings/spec/common';\nimport { isMiniAppLikeMode, isMobileLikeMode } from '../../../util/env';\nimport { DeskTopTrigger } from './desktop';\nimport { MobileTrigger } from './mobile';\n\nexport function getDefaultTriggerEventByMode(mode: RenderMode) {\n if (mode === RenderModeEnum['desktop-browser'] || mode === RenderModeEnum['desktop-miniApp']) {\n return {\n start: 'pointerdown',\n move: 'pointermove',\n end: ['pointerup', 'pointerupoutside'],\n zoom: 'wheel',\n zoomEnd: 'pointerup',\n scroll: 'wheel',\n // scrollEnd: 'pointerup',\n trigger: DeskTopTrigger\n };\n }\n\n if (isMobileLikeMode(mode) || isMiniAppLikeMode(mode)) {\n return {\n start: 'pointerdown',\n move: 'pointermove',\n end: ['pointerup', 'pointerupoutside'],\n zoom: 'pinch',\n zoomEnd: 'pinchend',\n scroll: 'pan',\n scrollEnd: 'panend',\n trigger: MobileTrigger\n };\n }\n\n return null;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/crosshair/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { ITooltipActiveTypeAsKeys } from '../../tooltip/interface/common';\nimport type { IPadding, StringOrNumber, ILineMarkSpec, IRectMarkSpec, ITextMarkSpec } from '../../../typings';\nimport type { IAxis } from '../../axis/interface';\nimport type { IComponentSpec } from '../../base/interface';\nimport type { IComponent } from '../../interface';\n\nexport interface ICrossHair extends IComponent {\n clearAxisValue?: () => void;\n setAxisValue?: (v: StringOrNumber, axis: IAxis) => void;\n layoutByValue?: (v?: number) => void;\n hide?: () => void;\n}\n\nexport type CrossHairTrigger = 'click' | 'hover' | ['click', 'hover'];\n\nexport interface ICommonCrosshairSpec extends IComponentSpec {\n /**\n * 是否和tooltip保持同步\n * tooltip出现的时候crosshair出现;tooltip隐藏的时候crsshair隐藏;\n * @since 1.11.1\n */\n followTooltip?: boolean | Partial<ITooltipActiveTypeAsKeys<boolean, boolean, boolean>>;\n /**\n * 是否可以通过 点击 固定住一组 crosshair,也可以同时触发。\n * @default 'hover'\n */\n trigger?: CrossHairTrigger;\n /**\n * 隐藏crosshair的触发方式(目前仅支持和trigger一致的设置以及none)\n */\n triggerOff?: CrossHairTrigger | 'none' | number;\n /**\n * 点击后锁定,只有点击才可以更新位置或者解锁\n *\n * @since 1.9.0\n */\n lockAfterClick?: boolean;\n /**\n * crosshair 文本的显示层级\n */\n labelZIndex?: number;\n /**\n * crosshair 辅助图形的显示层级\n */\n gridZIndex?: number;\n}\n\n/**\n * 笛卡尔坐标系下的 crosshair 配置\n */\nexport interface ICartesianCrosshairSpec extends ICommonCrosshairSpec {\n /**\n * 笛卡尔坐标系下 x 轴上 crosshair 配置\n */\n xField?: ICrosshairCategoryFieldSpec;\n /**\n * 笛卡尔坐标系下 y 轴上 crosshair 配置\n */\n yField?: ICrosshairCategoryFieldSpec;\n}\n\n/**\n * 极坐标系下的 crosshair 配置\n */\nexport interface IPolarCrosshairSpec extends ICommonCrosshairSpec {\n /**\n * 极坐标系下 categoryField 字段对应轴上的 crosshair 配置\n */\n categoryField?: ICrosshairCategoryFieldSpec;\n /**\n * 极坐标系下 valueField 字段对应轴上的 crosshair 配置\n */\n valueField?: ICrosshairValueFieldSpec;\n}\nexport interface ICrosshairCategoryFieldSpec extends ICrosshairDataBindSpec {\n /**\n * 是否可见\n */\n visible: boolean;\n /**\n * crosshair 辅助图形配置\n */\n line?: ICrosshairLineSpec | Omit<ICrosshairRectSpec, 'width'>;\n /**\n * crosshair 文本配置\n */\n label?: ICrosshairLabelSpec;\n}\n\nexport interface ICrosshairValueFieldSpec extends ICrosshairDataBindSpec {\n /**\n * 是否可见\n */\n visible: boolean;\n /**\n * crosshair 辅助图形配置\n */\n line?: ICrosshairLineSpec;\n /**\n * crosshair 文本配置\n */\n label?: ICrosshairLabelSpec;\n}\n\nexport type ICrosshairLineStyle = Pick<\n ILineMarkSpec,\n 'stroke' | 'strokeOpacity' | 'opacity' | 'lineDash' | 'lineWidth'\n>;\nexport type ICrosshairRectStyle = ICrosshairLineStyle & Pick<IRectMarkSpec, 'fill' | 'fillOpacity' | 'cornerRadius'>;\n\nexport interface ICrosshairLineSpec {\n /**\n * 是否显示\n */\n visible?: boolean;\n /**\n * 辅助图形的类型\n */\n type?: 'line';\n /**\n * 线宽\n * @default 2\n */\n width?: number;\n /** 极坐标系下是否平滑 */\n smooth?: boolean;\n /**\n * 辅助图形的样式配置\n */\n style?: ICrosshairLineStyle;\n}\n\nexport type ICrosshairRectWidthCallback = (axisSize: { width: number; height: number }, axis: IAxis) => number;\n\nexport interface ICrosshairRectSpec {\n visible?: boolean;\n type?: 'rect';\n /**\n * 字符串xx%表示此处是内容区间的百分比,数字表示宽度像素,\n * 仅支持笛卡尔坐标系下的 crosshair 配置\n * @default '100%''\n */\n width?: number | string | ICrosshairRectWidthCallback;\n style?: ICrosshairRectStyle;\n}\n\nexport interface ICrosshairLabelSpec {\n visible?: boolean;\n /**\n * label 文本格式化方法\n * @param text\n * @returns\n */\n formatMethod?: (text: StringOrNumber | string[]) => string | string[];\n /**\n * 格式化模板\n * @description 可以通过类似 `{value:.2f}%` 的形式对指定数据字段进行格式化\n * @since 1.10.0\n */\n formatter?: string | string[];\n /**\n * 文本样式配置\n */\n style?: Partial<ITextMarkSpec>;\n /**\n * 文本背景相关配置\n */\n labelBackground?: ICrosshairLabelBackgroundSpec;\n}\n\nexport interface ICrosshairLabelBackgroundSpec {\n /**\n * 是否显示背景,默认为 true\n */\n visible?: boolean;\n /**\n * 最小宽度,像素值\n * @default 30\n */\n minWidth?: number;\n /**\n * 最大宽度,像素值。当文字超过最大宽度时,会自动省略。\n */\n maxWidth?: number;\n /**\n * 内部边距\n */\n padding?: IPadding | number | number[];\n style?: Partial<IRectMarkSpec>;\n}\n\nexport interface ICrosshairDataBindSpec {\n /**\n * 声明 crosshair 绑定的轴索引,如果没有声明,则会默认绑定所有同 crosshair 位置相对应的轴。\n */\n bindingAxesIndex?: number[];\n /**\n * crosshair 初始化显示信息,通过该配置可在图表绘制时默认展示 crosshair 组件。\n */\n defaultSelect?: {\n /**\n * 声明要显示数据的轴索引\n */\n axisIndex: number;\n /**\n * 声明显示的数据\n */\n datum: StringOrNumber;\n };\n}\n\nexport type ICrosshairSpec = ICartesianCrosshairSpec | IPolarCrosshairSpec;\n"]}
1
+ {"version":3,"sources":["../src/component/crosshair/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { ITooltipActiveTypeAsKeys } from '../../tooltip/interface/common';\nimport type { IPadding, StringOrNumber, ILineMarkSpec, IRectMarkSpec, ITextMarkSpec } from '../../../typings';\nimport type { IAxis } from '../../axis/interface';\nimport type { IComponentSpec } from '../../base/interface';\nimport type { IComponent } from '../../interface';\n\nexport interface ICrossHair extends IComponent {\n clearAxisValue?: () => void;\n setAxisValue?: (v: StringOrNumber, axis: IAxis) => void;\n layoutByValue?: (v?: number) => void;\n hide?: () => void;\n}\n\nexport type CrossHairTrigger = 'click' | 'hover' | ['click', 'hover'];\n\nexport interface ICommonCrosshairSpec extends IComponentSpec {\n /**\n * 是否和tooltip保持同步,默认为false\n * tooltip出现的时候crosshair出现;tooltip隐藏的时候crsshair隐藏;\n * 默认只要有tooltip显示,都会显示crosshair\n * 也可以通过设置 followTooltip.dimension 为 `false` 来实现显示dimension tooltip的时候不显示crosshair\n * 设置 followTooltip.mark 为 `false` 来实现显示mark tooltip的时候不显示crosshair\n * 设置 followTooltip.group 为 `false` 来实现显示group tooltip的时候不显示crosshair\n *\n * @since 1.11.1\n */\n followTooltip?: boolean | Partial<ITooltipActiveTypeAsKeys<boolean, boolean, boolean>>;\n /**\n * 是否可以通过 点击 固定住一组 crosshair,也可以同时触发。\n * @default 'hover'\n */\n trigger?: CrossHairTrigger;\n /**\n * 隐藏crosshair的触发方式(目前仅支持和trigger一致的设置以及none)\n */\n triggerOff?: CrossHairTrigger | 'none' | number;\n /**\n * 点击后锁定,只有点击才可以更新位置或者解锁\n *\n * @since 1.9.0\n */\n lockAfterClick?: boolean;\n /**\n * crosshair 文本的显示层级\n */\n labelZIndex?: number;\n /**\n * crosshair 辅助图形的显示层级\n */\n gridZIndex?: number;\n}\n\n/**\n * 笛卡尔坐标系下的 crosshair 配置\n */\nexport interface ICartesianCrosshairSpec extends ICommonCrosshairSpec {\n /**\n * 笛卡尔坐标系下 x 轴上 crosshair 配置\n */\n xField?: ICrosshairCategoryFieldSpec;\n /**\n * 笛卡尔坐标系下 y 轴上 crosshair 配置\n */\n yField?: ICrosshairCategoryFieldSpec;\n}\n\n/**\n * 极坐标系下的 crosshair 配置\n */\nexport interface IPolarCrosshairSpec extends ICommonCrosshairSpec {\n /**\n * 极坐标系下 categoryField 字段对应轴上的 crosshair 配置\n */\n categoryField?: ICrosshairCategoryFieldSpec;\n /**\n * 极坐标系下 valueField 字段对应轴上的 crosshair 配置\n */\n valueField?: ICrosshairValueFieldSpec;\n}\nexport interface ICrosshairCategoryFieldSpec extends ICrosshairDataBindSpec {\n /**\n * 是否可见\n */\n visible: boolean;\n /**\n * crosshair 辅助图形配置\n */\n line?: ICrosshairLineSpec | Omit<ICrosshairRectSpec, 'width'>;\n /**\n * crosshair 文本配置\n */\n label?: ICrosshairLabelSpec;\n}\n\nexport interface ICrosshairValueFieldSpec extends ICrosshairDataBindSpec {\n /**\n * 是否可见\n */\n visible: boolean;\n /**\n * crosshair 辅助图形配置\n */\n line?: ICrosshairLineSpec;\n /**\n * crosshair 文本配置\n */\n label?: ICrosshairLabelSpec;\n}\n\nexport type ICrosshairLineStyle = Pick<\n ILineMarkSpec,\n 'stroke' | 'strokeOpacity' | 'opacity' | 'lineDash' | 'lineWidth'\n>;\nexport type ICrosshairRectStyle = ICrosshairLineStyle & Pick<IRectMarkSpec, 'fill' | 'fillOpacity' | 'cornerRadius'>;\n\nexport interface ICrosshairLineSpec {\n /**\n * 是否显示辅助图形\n */\n visible?: boolean;\n /**\n * 辅助图形的类型设置为'line'\n */\n type?: 'line';\n /**\n * 线宽\n * @default 2\n */\n width?: number;\n /**\n * 极坐标系下是否平滑\n */\n smooth?: boolean;\n /**\n * 辅助图形的样式配置\n */\n style?: ICrosshairLineStyle;\n}\n\nexport type ICrosshairRectWidthCallback = (axisSize: { width: number; height: number }, axis: IAxis) => number;\n\nexport interface ICrosshairRectSpec {\n /**\n * 是否显示辅助图形\n */\n visible?: boolean;\n /**\n * 辅助图形的类型设置为'rect'\n */\n type?: 'rect';\n /**\n * 字符串xx%表示此处是内容区间的百分比,数字表示宽度像素,\n * 仅支持笛卡尔坐标系下的 crosshair 配置\n * @default '100%''\n */\n width?: number | string | ICrosshairRectWidthCallback;\n /**\n * 辅助图形的样式配置\n */\n style?: ICrosshairRectStyle;\n}\n\nexport interface ICrosshairLabelSpec {\n /**\n * 十字准星辅助标签是否展示\n */\n visible?: boolean;\n /**\n * label 文本格式化方法\n * @param text\n * @returns\n */\n formatMethod?: (text: StringOrNumber | string[]) => string | string[];\n /**\n * 格式化模板\n * @description 可以通过类似 `{value:.2f}%` 的形式对指定数据字段进行格式化\n * @since 1.10.0\n */\n formatter?: string | string[];\n /**\n * 文本样式配置\n */\n style?: Partial<ITextMarkSpec>;\n /**\n * 文本背景相关配置\n */\n labelBackground?: ICrosshairLabelBackgroundSpec;\n}\n\nexport interface ICrosshairLabelBackgroundSpec {\n /**\n * 是否显示背景,默认为 true\n */\n visible?: boolean;\n /**\n * 最小宽度,像素值\n * @default 30\n */\n minWidth?: number;\n /**\n * 最大宽度,像素值。当文字超过最大宽度时,会自动省略。\n */\n maxWidth?: number;\n /**\n * 内部边距\n */\n padding?: IPadding | number | number[];\n /**\n * 标签背景的样式配置\n */\n style?: Partial<IRectMarkSpec>;\n}\n\nexport interface ICrosshairDataBindSpec {\n /**\n * 声明 crosshair 绑定的轴索引,如果没有声明,则会默认绑定所有同 crosshair 位置相对应的轴。\n */\n bindingAxesIndex?: number[];\n /**\n * crosshair 初始化显示信息,通过该配置可在图表绘制时默认展示 crosshair 组件。\n */\n defaultSelect?: {\n /**\n * 声明要显示数据的轴索引\n */\n axisIndex: number;\n /**\n * 声明显示的数据\n */\n datum: StringOrNumber;\n };\n}\n\nexport type ICrosshairSpec = ICartesianCrosshairSpec | IPolarCrosshairSpec;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/data-zoom/data-zoom/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IMarkSpec } from '../../../typings/spec';\nimport type {\n IAreaMarkSpec,\n ILineMarkSpec,\n IRectMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec\n} from '../../../typings/visual';\nimport type { IComponentSpec } from '../../base/interface';\nimport type { ComponentThemeWithDirection, IComponent } from '../../interface';\nimport type { IFilterMode, IDataFilterComponent, IDataFilterComponentSpec } from '../interface';\n\nexport type IDataZoom = IComponent & IDataFilterComponent;\n\n// TODO: 开放的状态样式配置较少,暂时不使用markSpec方式配置\nexport interface IDataZoomStyle {\n /**\n * 是否显示startText和endText\n * @default 'auto' 鼠标hover在选中区域时才显示startText和endText\n */\n showDetail?: 'auto' | boolean;\n /**\n * 中间手柄样式\n */\n middleHandler?: {\n /**\n * 中间手柄是否可见\n */\n visible?: boolean;\n /**\n * 中间手柄的中点图标\n */\n icon?: ISymbolMarkSpec;\n /**\n * 中间手柄的背景矩形\n */\n background?: {\n /**\n * 中间手柄背景矩形的尺寸(当缩略轴为横向时,该尺寸代表高度;同理,当缩略轴为纵向时,该尺寸代表宽度)。\n */\n size?: number;\n } & IRectMarkSpec;\n };\n /**\n * 缩略轴的背景矩形\n */\n background?: {\n /**\n * 缩略轴背景矩形的尺寸(当缩略轴为横向时,该尺寸代表高度;同理,当缩略轴为纵向时,该尺寸代表宽度)\n */\n size?: number;\n } & IRectMarkSpec;\n /**\n * 缩略轴的起点手柄\n */\n startHandler?: ISymbolMarkSpec;\n /**\n * 缩略轴的终点手柄\n */\n endHandler?: ISymbolMarkSpec;\n /**\n * 起点文字样式配置\n */\n startText?: {\n /**\n * 起点文字外边距配置\n */\n padding?: number;\n } & ITextMarkSpec;\n /**\n * 终点文字样式配置\n */\n endText?: {\n /**\n * 终点文字外边距配置\n */\n padding?: number;\n } & ITextMarkSpec;\n /**\n * 缩略轴的拖拽轨迹图元\n */\n dragMask?: IRectMarkSpec;\n /**\n * 缩略轴的选中部分对应的矩形样式配置\n */\n selectedBackground?: IRectMarkSpec;\n /**\n * 缩略轴的预览图表\n */\n backgroundChart?: {\n /**\n * 缩略轴的预览图表,line 样式配置\n */\n line?: ILineMarkSpec;\n /**\n * 缩略轴的预览图表,area 样式配置\n */\n area?: IAreaMarkSpec;\n };\n /**\n * 缩略轴的选中部分预览图表样式配置\n */\n selectedBackgroundChart?: {\n /**\n * 缩略轴的选中部分,line 样式配置\n */\n line?: ILineMarkSpec;\n /**\n * 缩略轴的选中部分,area 样式配置\n */\n area?: IAreaMarkSpec;\n };\n}\n\n/** spec */\nexport interface IDataZoomSpec extends IDataZoomStyle, IDataFilterComponentSpec {\n /**\n * @since 1.11.3\n * 是否展示背景图\n */\n showBackgroundChart?: boolean;\n /**\n * 数据过滤模式\n * @default 'filter' (dataZoom默认数据过滤模式)\n * 'filter' 为过滤数据从而达到缩放轴的效果, 'axis'为直接缩放轴, 不过滤数据\n * 具体效果可参考: https://www.visactor.io/vchart/demo/sequence-chart/social-media-event?keyword=dataZoom\n */\n filterMode?: IFilterMode;\n /**\n * 背景趋势线对应的字段\n */\n valueField?: string;\n /**\n * 起始点文字标签format格式配置\n */\n startText?: {\n /**\n * 起点文字外边距配置\n */\n padding?: number;\n /**\n * 起点文字文本样式配置\n */\n style?: IMarkSpec<ITextMarkSpec>;\n /**\n * 起点文字格式化配置,使用回调函数的形式配置。\n */\n formatMethod?: (text: string | number) => string | string[];\n /**\n * 格式化模板\n * @description 可以通过类似 `{value:.2f}%` 的形式对指定数据字段进行格式化\n * @since 1.10.0\n */\n formatter?: string | string[];\n };\n endText?: {\n /**\n * 终点文字外边距配置\n */\n padding?: number;\n /**\n * 终点文字文本样式配置\n */\n style?: IMarkSpec<ITextMarkSpec>;\n /**\n *\n * 终点文字格式化配置, 使用回调函数的形式配置\n */\n formatMethod?: (text: string | number) => string | string[];\n /**\n * 格式化模板\n * @description 可以通过类似 `{value:.2f}%` 的形式对指定数据字段进行格式化\n * @since 1.10.0\n */\n formatter?: string | string[];\n };\n /**\n * 是否开启框选, 如果不开启则支持selectedBackground拖拽(框选和拖拽两者互斥)\n * @default false\n */\n brushSelect?: boolean;\n /**\n * 是否忽略轴上配置的固定 bandSize\n * 如果置为 true,则 datazoom 可以任意改变轴的 bandSize。\n * 但如果轴上配置了 bandSize 范围,则第一次渲染会保持 bandSize 在配置范围内。\n * 该配置仅在 auto 设为 true 时生效。\n * @since 1.7.0\n */\n ignoreBandSize?: boolean;\n\n /**\n * 背景图表节点压缩率, 如果不配置则默认将节点限制在10000个\n * @since 1.10.0\n */\n tolerance?: number;\n}\n\nexport type IDataZoomCommonTheme = IComponentSpec &\n IDataZoomStyle & {\n /** 显示的位置 */\n orient?: IDataZoomSpec['orient'];\n /** 组件宽度 */\n width?: IDataZoomSpec['width'];\n /** 组件高度 */\n height?: IDataZoomSpec['height'];\n /**\n * 是否开启框选, 如果不开启则支持selectedBackground拖拽(框选和拖拽两者互斥)\n * @default false\n */\n brushSelect?: boolean;\n };\n\nexport type IDataZoomTheme = ComponentThemeWithDirection<IDataZoomCommonTheme>;\n"]}
1
+ {"version":3,"sources":["../src/component/data-zoom/data-zoom/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IMarkSpec } from '../../../typings/spec';\nimport type {\n IAreaMarkSpec,\n ILineMarkSpec,\n IRectMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec\n} from '../../../typings/visual';\nimport type { IComponentSpec } from '../../base/interface';\nimport type { ComponentThemeWithDirection, IComponent } from '../../interface';\nimport type { IFilterMode, IDataFilterComponent, IDataFilterComponentSpec } from '../interface';\n\nexport type IDataZoom = IComponent & IDataFilterComponent;\n\n// TODO: 开放的状态样式配置较少,暂时不使用markSpec方式配置\nexport interface IDataZoomStyle {\n /**\n * 是否显示startText和endText\n * @default 'auto' 鼠标hover在选中区域时才显示startText和endText\n */\n showDetail?: 'auto' | boolean;\n /**\n * 中间手柄样式\n */\n middleHandler?: {\n /**\n * 中间手柄是否可见\n */\n visible?: boolean;\n /**\n * 中间手柄的中点图标\n */\n icon?: ISymbolMarkSpec;\n /**\n * 中间手柄的背景矩形\n */\n background?: {\n /**\n * 中间手柄背景矩形的尺寸(当缩略轴为横向时,该尺寸代表高度;同理,当缩略轴为纵向时,该尺寸代表宽度)。\n */\n size?: number;\n } & IRectMarkSpec;\n };\n /**\n * 缩略轴的背景矩形\n */\n background?: {\n /**\n * 缩略轴背景矩形的尺寸(当缩略轴为横向时,该尺寸代表高度;同理,当缩略轴为纵向时,该尺寸代表宽度)\n */\n size?: number;\n } & IRectMarkSpec;\n /**\n * 缩略轴的起点手柄\n */\n startHandler?: ISymbolMarkSpec;\n /**\n * 缩略轴的终点手柄\n */\n endHandler?: ISymbolMarkSpec;\n /**\n * 起点文字样式配置\n */\n startText?: {\n /**\n * 起点文字外边距配置\n */\n padding?: number;\n } & ITextMarkSpec;\n /**\n * 终点文字样式配置\n */\n endText?: {\n /**\n * 终点文字外边距配置\n */\n padding?: number;\n } & ITextMarkSpec;\n /**\n * 缩略轴的拖拽轨迹图元\n */\n dragMask?: IRectMarkSpec;\n /**\n * 缩略轴的选中部分对应的矩形样式配置\n */\n selectedBackground?: IRectMarkSpec;\n /**\n * 缩略轴的预览图表\n */\n backgroundChart?: {\n /**\n * 缩略轴的预览图表,line 样式配置\n */\n line?: ILineMarkSpec;\n /**\n * 缩略轴的预览图表,area 样式配置\n */\n area?: IAreaMarkSpec;\n };\n /**\n * 缩略轴的选中部分预览图表样式配置\n */\n selectedBackgroundChart?: {\n /**\n * 缩略轴的选中部分,line 样式配置\n */\n line?: ILineMarkSpec;\n /**\n * 缩略轴的选中部分,area 样式配置\n */\n area?: IAreaMarkSpec;\n };\n}\n\n/** spec */\nexport interface IDataZoomSpec extends IDataZoomStyle, IDataFilterComponentSpec {\n /**\n * 是否展示背景图\n * @since 1.11.3\n */\n showBackgroundChart?: boolean;\n /**\n * 数据过滤模式\n * 'filter' 为过滤数据从而达到缩放轴的效果, 'axis'为直接缩放轴, 不过滤数据\n * 具体效果可参考: https://www.visactor.io/vchart/demo/sequence-chart/social-media-event?keyword=dataZoom\n * @default 'filter' (dataZoom默认数据过滤模式)\n */\n filterMode?: IFilterMode;\n /**\n * 背景趋势线对应的字段\n */\n valueField?: string;\n /**\n * 起始点文字标签format格式配置\n */\n startText?: {\n /**\n * 起点文字外边距配置\n */\n padding?: number;\n /**\n * 起点文字文本样式配置\n */\n style?: IMarkSpec<ITextMarkSpec>;\n /**\n * 起点文字格式化配置,使用回调函数的形式配置。\n */\n formatMethod?: (text: string | number) => string | string[];\n /**\n * 格式化模板\n * @description 可以通过类似 `{value:.2f}%` 的形式对指定数据字段进行格式化\n * @since 1.10.0\n */\n formatter?: string | string[];\n };\n endText?: {\n /**\n * 终点文字外边距配置\n */\n padding?: number;\n /**\n * 终点文字文本样式配置\n */\n style?: IMarkSpec<ITextMarkSpec>;\n /**\n *\n * 终点文字格式化配置, 使用回调函数的形式配置\n */\n formatMethod?: (text: string | number) => string | string[];\n /**\n * 格式化模板\n * @description 可以通过类似 `{value:.2f}%` 的形式对指定数据字段进行格式化\n * @since 1.10.0\n */\n formatter?: string | string[];\n };\n /**\n * 是否开启框选, 如果不开启则支持selectedBackground拖拽(框选和拖拽两者互斥)\n * @default false\n */\n brushSelect?: boolean;\n /**\n * 是否忽略轴上配置的固定 bandSize\n * 如果置为 true,则 datazoom 可以任意改变轴的 bandSize。\n * 但如果轴上配置了 bandSize 范围,则第一次渲染会保持 bandSize 在配置范围内。\n * 该配置仅在 auto 设为 true 时生效。\n * @since 1.7.0\n */\n ignoreBandSize?: boolean;\n\n /**\n * 背景图表节点压缩率, 如果不配置则默认将节点限制在10000个\n * @since 1.10.0\n */\n tolerance?: number;\n}\n\nexport type IDataZoomCommonTheme = IComponentSpec &\n IDataZoomStyle & {\n /** 显示的位置 */\n orient?: IDataZoomSpec['orient'];\n /** 组件宽度 */\n width?: IDataZoomSpec['width'];\n /** 组件高度 */\n height?: IDataZoomSpec['height'];\n /**\n * 是否开启框选, 如果不开启则支持selectedBackground拖拽(框选和拖拽两者互斥)\n * @default false\n */\n brushSelect?: boolean;\n };\n\nexport type IDataZoomTheme = ComponentThemeWithDirection<IDataZoomCommonTheme>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/label/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { BaseLabelAttrs } from '@visactor/vrender-components';\nimport type { ConvertToMarkStyleSpec, Datum, IComposedTextMarkSpec, IFormatMethod, ITextMarkSpec } from '../../typings';\nimport type { IComponentSpec } from '../base/interface';\nimport type { ILabelMark } from '../../mark/interface';\nimport type { ISeries } from '../../series/interface';\nimport type { ICompilableMark } from '../../compile/mark/interface';\nimport type { IRegion } from '../../region/interface';\n\nexport interface ILabelInfo {\n baseMark: ICompilableMark;\n labelMark: ILabelMark;\n series: ISeries;\n labelSpec: TransformedLabelSpec;\n}\n\nexport interface ILabelComponentContext {\n region: IRegion;\n labelInfo: ILabelInfo[];\n}\n\nexport interface ILabelFormatMethodContext {\n series?: ISeries;\n}\n\n/**\n * 系列图元标签配置,一般用于展示数据项\n */\nexport interface ILabelSpec extends IComponentSpec, ILabelAnimationSpec {\n /** 默认不显示标签 */\n visible?: boolean;\n /**\n * 是否支持交互。\n * @default false\n */\n interactive?: boolean;\n /**\n * 文本类型:text, rich,\n * @since 1.7.0\n * @deprecated\n */\n textType?: 'text' | 'rich';\n /**\n * 格式化函数\n * @since 1.10.0 支持返回结构 `{type:'rich', text: [{text:'some text', fill:'black', fontSize: 20}]}\n */\n formatMethod?: IFormatMethod<[text: string | string[], datum?: Datum, ctx?: ILabelFormatMethodContext]>;\n /**\n * 字符串模版\n * 用{}包裹变量名的字符串模版, 变量名取自数据属性值\n * eg: 'type={type},value={value}'\n * @since 1.7.0\n */\n formatter?: string | string[];\n /** 标签与其对应数据图元的间距 */\n offset?: number;\n /** 标签位置 */\n position?: string;\n /** 标签样式配置 */\n style?: ConvertToMarkStyleSpec<IComposedTextMarkSpec>;\n /** 交互样式配置 */\n state?: LabelStateStyle<Partial<IComposedTextMarkSpec>>;\n /** 标签防重叠配置 */\n overlap?: BaseLabelAttrs['overlap'];\n /** 标签智能反色配置 */\n smartInvert?: BaseLabelAttrs['smartInvert'];\n /**\n * 堆积数据过滤类型\n * @since 1.12.0\n */\n stackDataFilterType?: 'min' | 'max';\n /** 自定义标签数据筛选和排序\n * @since 1.3.0\n */\n dataFilter?: BaseLabelAttrs['dataFilter'];\n /** 自定义标签布局函数。\n * @description 当配置了 customLayoutFunc 后,默认布局和防重叠逻辑将不再生效。(overlap/position/offset不生效)\n * @since 1.3.0\n */\n customLayoutFunc?: BaseLabelAttrs['customLayoutFunc'];\n /** 自定义标签躲避函数\n * @description 当配置了 customOverlapFunc 后,会根据 position 和 offset 进行初始布局。配置的防重叠逻辑(overlap)不生效。\n * @since 1.3.0\n */\n customOverlapFunc?: BaseLabelAttrs['customOverlapFunc'];\n /** 标签布局 */\n labelLayout?: 'series' | 'region';\n /** 是否支持3D */\n support3d?: boolean;\n /**\n * 是否同步数据图元的状态变化\n * @default false\n * @since 1.9.0\n */\n syncState?: boolean;\n}\n\nexport type ILabelAnimationSpec = Pick<\n BaseLabelAttrs,\n 'animation' | 'animationEnter' | 'animationUpdate' | 'animationExit'\n>;\nexport type IMultiLabelSpec<T extends Omit<ILabelSpec, 'position'>> = T | T[];\n\ntype LabelStateStyle<T> = {\n /**\n * 标签hover状态样式配置\n */\n hover?: T;\n /**\n * 标签hover_reverse状态样式配置\n */\n hover_reverse?: T;\n /**\n * 标签选中状态样式配置\n */\n selected?: T;\n /**\n * 标签未选中状态样式配置\n */\n selected_reverse?: T;\n};\n\nexport type ITotalLabelSpec = Pick<\n ILabelSpec,\n 'visible' | 'formatMethod' | 'interactive' | 'offset' | 'style' | 'state' | 'textType' | 'overlap'\n>;\n\nexport interface ITotalLabelTheme\n extends Pick<ILabelSpec, 'visible' | 'interactive' | 'offset' | 'overlap' | 'smartInvert' | 'animation'> {\n style?: ITextMarkSpec;\n}\n\n// 内部处理转换后的标签配置\nexport type TransformedLabelSpec = ILabelSpec & {\n getStyleHandler: (series: ISeries) => (mark?: ILabelMark, spec?: any) => void;\n};\n"]}
1
+ {"version":3,"sources":["../src/component/label/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { BaseLabelAttrs } from '@visactor/vrender-components';\nimport type { ConvertToMarkStyleSpec, Datum, IComposedTextMarkSpec, IFormatMethod, ITextMarkSpec } from '../../typings';\nimport type { IComponentSpec } from '../base/interface';\nimport type { ILabelMark } from '../../mark/interface';\nimport type { ISeries } from '../../series/interface';\nimport type { ICompilableMark } from '../../compile/mark/interface';\nimport type { IRegion } from '../../region/interface';\n\nexport interface ILabelInfo {\n baseMark: ICompilableMark;\n labelMark: ILabelMark;\n series: ISeries;\n labelSpec: TransformedLabelSpec;\n}\n\nexport interface ILabelComponentContext {\n region: IRegion;\n labelInfo: ILabelInfo[];\n}\n\nexport interface ILabelFormatMethodContext {\n series?: ISeries;\n}\n\n/**\n * 系列图元标签配置,一般用于展示数据项\n */\nexport interface ILabelSpec extends IComponentSpec, ILabelAnimationSpec {\n /** 默认不显示标签 */\n visible?: boolean;\n /**\n * 是否支持交互。\n * @default false\n */\n interactive?: boolean;\n /**\n * 文本类型:text, rich,\n * @since 1.7.0\n * @deprecated\n */\n textType?: 'text' | 'rich';\n /**\n * 格式化函数\n * @since 1.10.0 支持返回结构 `{type:'rich', text: [{text:'some text', fill:'black', fontSize: 20}]}\n */\n formatMethod?: IFormatMethod<[text: string | string[], datum?: Datum, ctx?: ILabelFormatMethodContext]>;\n /**\n * 字符串模版\n * 用{}包裹变量名的字符串模版, 变量名取自数据属性值\n * eg: 'type={type},value={value}'\n * @since 1.7.0\n */\n formatter?: string | string[];\n /** 标签与其对应数据图元的间距 */\n offset?: number;\n /** 标签位置 */\n position?: string;\n /** 标签样式配置 */\n style?: ConvertToMarkStyleSpec<IComposedTextMarkSpec>;\n /** 交互样式配置 */\n state?: LabelStateStyle<Partial<IComposedTextMarkSpec>>;\n /** 标签防重叠配置 */\n overlap?: BaseLabelAttrs['overlap'];\n /** 标签智能反色配置 */\n smartInvert?: BaseLabelAttrs['smartInvert'];\n /**\n * 堆积数据过滤类型\n * @since 1.12.0\n */\n stackDataFilterType?: 'min' | 'max';\n /** 自定义标签数据筛选和排序\n * @since 1.3.0\n */\n dataFilter?: BaseLabelAttrs['dataFilter'];\n /** 自定义标签布局函数。\n * @description 当配置了 customLayoutFunc 后,默认布局和防重叠逻辑将不再生效。(overlap/position/offset不生效)\n * @since 1.3.0\n */\n customLayoutFunc?: BaseLabelAttrs['customLayoutFunc'];\n /** 自定义标签躲避函数\n * @description 当配置了 customOverlapFunc 后,会根据 position 和 offset 进行初始布局。配置的防重叠逻辑(overlap)不生效。\n * @since 1.3.0\n */\n customOverlapFunc?: BaseLabelAttrs['customOverlapFunc'];\n /**\n * 标签布局\n */\n labelLayout?: 'series' | 'region';\n /**\n * 是否支持3D\n */\n support3d?: boolean;\n /**\n * 是否同步数据图元的状态变化\n * @default false\n * @since 1.9.0\n */\n syncState?: boolean;\n}\n\nexport type ILabelAnimationSpec = Pick<\n BaseLabelAttrs,\n 'animation' | 'animationEnter' | 'animationUpdate' | 'animationExit'\n>;\nexport type IMultiLabelSpec<T extends Omit<ILabelSpec, 'position'>> = T | T[];\n\ntype LabelStateStyle<T> = {\n /**\n * 标签hover状态样式配置\n */\n hover?: T;\n /**\n * 标签hover_reverse状态样式配置\n */\n hover_reverse?: T;\n /**\n * 标签选中状态样式配置\n */\n selected?: T;\n /**\n * 标签未选中状态样式配置\n */\n selected_reverse?: T;\n};\n\nexport type ITotalLabelSpec = Pick<\n ILabelSpec,\n 'visible' | 'formatMethod' | 'interactive' | 'offset' | 'style' | 'state' | 'textType' | 'overlap'\n>;\n\nexport interface ITotalLabelTheme\n extends Pick<ILabelSpec, 'visible' | 'interactive' | 'offset' | 'overlap' | 'smartInvert' | 'animation'> {\n style?: ITextMarkSpec;\n}\n\n// 内部处理转换后的标签配置\nexport type TransformedLabelSpec = ILabelSpec & {\n getStyleHandler: (series: ISeries) => (mark?: ILabelMark, spec?: any) => void;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/legend/continuous/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../../typings';\nimport type { ComponentThemeWithDirection } from '../../interface';\nimport type { ILegendCommonSpec, NoVisibleMarkStyle } from '../interface';\n\ntype Text = StringOrNumber;\n\nexport type TextAttribute = {\n /** 是否展示 */\n visible?: boolean;\n /** 文本内容 */\n text?: Text;\n /**\n * 文本同滑块的间距,默认为 6\n */\n space?: number;\n /**\n * 文本样式\n */\n style?: Omit<NoVisibleMarkStyle<ITextMarkSpec>, 'text'>;\n};\n\nexport type HandlerTextAttribute = {\n /** 是否展示 */\n visible?: boolean;\n /**\n * 数据展示的小数精度,默认为0,无小数点。\n */\n precision?: number;\n /** 文本内容格式化函数 */\n formatter?: (text: Text) => Text;\n /**\n * 文本同滑块的间距,默认为 6\n */\n space?: number;\n /**\n * 文本样式\n */\n style?: Omit<NoVisibleMarkStyle<ITextMarkSpec>, 'text'>;\n};\n\n// 连续图例通用配置\nexport type IContinuousLegendSpec = ILegendCommonSpec & {\n /**\n * 是否开启反向展示\n * @default false\n * @since 1.11.0\n */\n inverse?: boolean;\n /**\n * 声明关联的映射字段\n */\n field?: string;\n /**\n * 连续图例关联的映射 scale\n */\n scale?: string;\n /**\n * 默认筛选的数据范围\n */\n defaultSelected?: [number, number];\n /**\n * 是否允许拖动,默认为 true\n */\n slidable?: boolean;\n /**\n * 滑块轨道配置\n */\n rail?: {\n /**\n * 滑块的宽度\n */\n width?: number;\n /**\n * 滑块的高度\n */\n height?: number;\n /**\n * 背景轨道样式配置\n */\n style?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'width' | 'height'>;\n };\n /**\n * 滑块手柄配置\n */\n handler?: {\n /**\n * 是否绘制 handler,默认为 true\n */\n visible?: boolean;\n /**\n * 滑块手柄的样式配置\n */\n style?: NoVisibleMarkStyle<ISymbolMarkSpec>;\n };\n /**\n * 选中区域样式配置\n */\n track?: {\n style?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'width' | 'height'>;\n };\n /**\n * 滑块首部文本配置\n */\n startText?: TextAttribute;\n /**\n * 滑块尾部文本配置\n */\n endText?: TextAttribute;\n /**\n * 滑块对应的文本配置项\n */\n handlerText?: HandlerTextAttribute;\n};\n\n// 颜色图例配置\nexport type IColorLegendSpec = IContinuousLegendSpec & {\n /**\n * 声明 color 类型图例\n */\n type: 'color';\n};\n\n// 尺寸图例配置\nexport type ISizeLegendSpec = IContinuousLegendSpec & {\n /**\n * 声明 size 类型图例\n */\n type: 'size';\n /**\n * size 背景样式配置\n */\n sizeBackground?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'visible' | 'width' | 'height'>;\n /**\n * 指定组件中手柄和文字的摆放位置,可选值为:\n * 'left' 手柄和label在滑块左侧,layout 为 vertical 时有效。\n * 'right' 手柄和label在滑块右侧,layout 为 vertical 时有效。\n * 'top' 手柄和label在滑块上侧,layout 为 horizontal 时有效。\n * 'bottom' 手柄和label在滑块下侧,layout 为 horizontal 时有效。\n */\n align?: 'top' | 'bottom' | 'left' | 'right';\n};\n\nexport type IContinuousLegendTheme = Omit<\n IContinuousLegendSpec,\n 'type' | 'field' | 'scale' | 'regionIndex' | 'regionId' | 'seriesIndex' | 'seriesId' | 'id' | 'defaultSelected'\n>;\n\nexport type ISizeLegendCommonTheme = IContinuousLegendTheme & {\n sizeBackground?: ISizeLegendSpec['sizeBackground'];\n};\n\nexport type IColorLegendTheme = ComponentThemeWithDirection<IContinuousLegendTheme>;\n\nexport type ISizeLegendTheme = ComponentThemeWithDirection<ISizeLegendCommonTheme>;\n"]}
1
+ {"version":3,"sources":["../src/component/legend/continuous/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../../typings';\nimport type { ComponentThemeWithDirection } from '../../interface';\nimport type { ILegendCommonSpec, NoVisibleMarkStyle } from '../interface';\n\ntype Text = StringOrNumber;\n\nexport type TextAttribute = {\n /** 是否展示 */\n visible?: boolean;\n /** 文本内容 */\n text?: Text;\n /**\n * 文本同滑块的间距,默认为 6\n */\n space?: number;\n /**\n * 文本样式\n */\n style?: Omit<NoVisibleMarkStyle<ITextMarkSpec>, 'text'>;\n};\n\nexport type HandlerTextAttribute = {\n /** 是否展示 */\n visible?: boolean;\n /**\n * 数据展示的小数精度,默认为0,无小数点。\n */\n precision?: number;\n /** 文本内容格式化函数 */\n formatter?: (text: Text) => Text;\n /**\n * 文本同滑块的间距,默认为 6\n */\n space?: number;\n /**\n * 文本样式\n */\n style?: Omit<NoVisibleMarkStyle<ITextMarkSpec>, 'text'>;\n};\n\n// 连续图例通用配置\nexport type IContinuousLegendSpec = ILegendCommonSpec & {\n /**\n * 连续图例是否开启反向展示,最小值和最大值会发生反向\n * @default false\n * @since 1.11.0\n */\n inverse?: boolean;\n /**\n * 声明关联的映射字段\n */\n field?: string;\n /**\n * 连续图例关联的映射 scale\n */\n scale?: string;\n /**\n * 默认筛选的数据范围\n */\n defaultSelected?: [number, number];\n /**\n * 是否允许拖动,默认为 true\n */\n slidable?: boolean;\n /**\n * 滑块轨道配置\n */\n rail?: {\n /**\n * 滑块的宽度\n */\n width?: number;\n /**\n * 滑块的高度\n */\n height?: number;\n /**\n * 背景轨道样式配置\n */\n style?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'width' | 'height'>;\n };\n /**\n * 滑块手柄配置\n */\n handler?: {\n /**\n * 是否绘制 handler,默认为 true\n */\n visible?: boolean;\n /**\n * 滑块手柄的样式配置\n */\n style?: NoVisibleMarkStyle<ISymbolMarkSpec>;\n };\n /**\n * 选中区域样式配置\n */\n track?: {\n style?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'width' | 'height'>;\n };\n /**\n * 滑块首部文本配置\n */\n startText?: TextAttribute;\n /**\n * 滑块尾部文本配置\n */\n endText?: TextAttribute;\n /**\n * 滑块对应的文本配置项\n */\n handlerText?: HandlerTextAttribute;\n};\n\n// 颜色图例配置\nexport type IColorLegendSpec = IContinuousLegendSpec & {\n /**\n * 声明 color 类型图例\n */\n type: 'color';\n};\n\n// 尺寸图例配置\nexport type ISizeLegendSpec = IContinuousLegendSpec & {\n /**\n * 声明 size 类型图例\n */\n type: 'size';\n /**\n * size 背景样式配置\n */\n sizeBackground?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'visible' | 'width' | 'height'>;\n /**\n * 指定组件中手柄和文字的摆放位置,可选值为:\n * 'left' 手柄和label在滑块左侧,layout 为 vertical 时有效。\n * 'right' 手柄和label在滑块右侧,layout 为 vertical 时有效。\n * 'top' 手柄和label在滑块上侧,layout 为 horizontal 时有效。\n * 'bottom' 手柄和label在滑块下侧,layout 为 horizontal 时有效。\n */\n align?: 'top' | 'bottom' | 'left' | 'right';\n};\n\nexport type IContinuousLegendTheme = Omit<\n IContinuousLegendSpec,\n 'type' | 'field' | 'scale' | 'regionIndex' | 'regionId' | 'seriesIndex' | 'seriesId' | 'id' | 'defaultSelected'\n>;\n\nexport type ISizeLegendCommonTheme = IContinuousLegendTheme & {\n sizeBackground?: ISizeLegendSpec['sizeBackground'];\n};\n\nexport type IColorLegendTheme = ComponentThemeWithDirection<IContinuousLegendTheme>;\n\nexport type ISizeLegendTheme = ComponentThemeWithDirection<ISizeLegendCommonTheme>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/legend/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { LegendTitle } from '@visactor/vrender-components';\nimport type {\n Datum,\n IOrientType,\n IPadding,\n IRectMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec,\n StringOrNumber\n} from '../../typings';\nimport type { IComponent } from '../interface';\nimport type { IComponentSpec } from '../base/interface';\nimport type { IDiscreteLegendSpec } from './discrete/interface';\nimport type { IColorLegendSpec, ISizeLegendSpec } from './continuous/interface';\n\nexport type ILegend = IComponent & {\n getLegendData: () => Datum[];\n getSelectedData: () => StringOrNumber[];\n setSelectedData: (d: StringOrNumber[]) => void;\n};\n\nexport interface IDiscreteLegend extends ILegend {\n getLegendDefaultData: (originalData?: boolean) => StringOrNumber[];\n}\n\nexport type NoVisibleMarkStyle<T> = Omit<T, 'visible'>;\n\nexport type ITitle = {\n /** 标题文本样式 */\n textStyle?: NoVisibleMarkStyle<ITextMarkSpec>;\n /**\n * @deprecated 请使用 textStyle 配置文本样式\n */\n style?: NoVisibleMarkStyle<ITextMarkSpec>;\n /** 文本前 mark 图元 */\n shape?: {\n /**\n * 是否展示 shape\n */\n visible?: boolean;\n /**\n * shape 同 文本的间距\n */\n space?: number;\n style?: NoVisibleMarkStyle<ISymbolMarkSpec>;\n };\n /**\n * 标题的背景面板配置\n */\n background?: {\n /**\n * 是否绘制背景层\n */\n visible?: boolean;\n /**\n * 背景层样式\n */\n style?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'visible' | 'width' | 'height'>;\n };\n} & Omit<LegendTitle, 'textStyle' | 'style' | 'background'>;\n\n// 图例组件通用配置\nexport type ILegendCommonSpec = {\n /**\n * 是否显示图例\n * @default true\n */\n visible?: boolean;\n /**\n * 图例位置\n * @default 'left'\n */\n orient?: IOrientType;\n /**\n * 图例在当前行列的对齐方式,起始 | 居中 | 末尾\n * @default 'middle'\n */\n position?: 'start' | 'middle' | 'end';\n /**\n * 图例组件的布局配置,默认自动跟随显示位置进行调整。\n * 1. `orient` 为 'top' 或者 'bottom' 时,默认为 'horizontal' 水平布局\n * 2. `orient` 为 'left' 或者 'right' 时,默认为 'vertical' 垂直布局\n */\n layout?: 'horizontal' | 'vertical';\n\n /**\n * 是否进行数据筛选,默认为 true\n */\n filter?: boolean;\n /**\n * 自定义筛选函数\n * @since 1.13.1\n * @param data 当前数据\n * @param selectedRange 选中的数据范围\n * @param datumField 筛选数据对应的字段\n * @returns 最终展示的数据\n */\n customFilter?: (data: any, selectedRange: StringOrNumber[], datumField: string) => any;\n\n /**\n * 图例标题配置\n */\n title?: ITitle;\n\n /**\n * 图例背景配置\n */\n background?: {\n /**\n * 是否绘制背景层\n */\n visible?: boolean;\n /**\n * 背景内边距\n */\n padding?: IPadding | number | number[];\n /**\n * 背景层样式\n */\n style?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'visible' | 'width' | 'height'>;\n };\n /**\n * 是否允许交互\n * @default true\n */\n interactive?: boolean;\n} & Omit<IComponentSpec, 'orient'>;\n\nexport type ILegendSpec = IDiscreteLegendSpec | IColorLegendSpec | ISizeLegendSpec;\n"]}
1
+ {"version":3,"sources":["../src/component/legend/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { LegendTitle } from '@visactor/vrender-components';\nimport type {\n Datum,\n IOrientType,\n IPadding,\n IRectMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec,\n StringOrNumber\n} from '../../typings';\nimport type { IComponent } from '../interface';\nimport type { IComponentSpec } from '../base/interface';\nimport type { IDiscreteLegendSpec } from './discrete/interface';\nimport type { IColorLegendSpec, ISizeLegendSpec } from './continuous/interface';\n\nexport type ILegend = IComponent & {\n getLegendData: () => Datum[];\n getSelectedData: () => StringOrNumber[];\n setSelectedData: (d: StringOrNumber[]) => void;\n};\n\nexport interface IDiscreteLegend extends ILegend {\n getLegendDefaultData: (originalData?: boolean) => StringOrNumber[];\n}\n\nexport type NoVisibleMarkStyle<T> = Omit<T, 'visible'>;\n\nexport type ITitle = {\n /** 标题文本样式 */\n textStyle?: NoVisibleMarkStyle<ITextMarkSpec>;\n /**\n * @deprecated 请使用 textStyle 配置文本样式\n */\n style?: NoVisibleMarkStyle<ITextMarkSpec>;\n /** 文本前 mark 图元 */\n shape?: {\n /**\n * 是否展示 shape\n */\n visible?: boolean;\n /**\n * shape 同 文本的间距\n */\n space?: number;\n style?: NoVisibleMarkStyle<ISymbolMarkSpec>;\n };\n /**\n * 标题的背景面板配置\n */\n background?: {\n /**\n * 是否绘制背景层\n */\n visible?: boolean;\n /**\n * 背景层样式\n */\n style?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'visible' | 'width' | 'height'>;\n };\n} & Omit<LegendTitle, 'textStyle' | 'style' | 'background'>;\n\n// 图例组件通用配置\nexport type ILegendCommonSpec = {\n /**\n * 是否显示图例\n * @default true\n */\n visible?: boolean;\n /**\n * 图例的位置,相对于region区域的四个方位,\n * left - 图例在左侧\n * right - 图例在右侧\n * top - 图例在上方\n * bottom - 图例在下方\n * @default 'left'\n */\n orient?: IOrientType;\n /**\n * 图例在当前行或者列的对齐方式,起始 | 居中 | 末尾,\n * 对于orient为'left'或者'right'的图例,\n * start - 图例在左侧\n * middle - 图例居中\n * end - 图例在右侧\n * 对于orient为'top'或者'bottom'的图例,\n * start - 图例在上方\n * middle - 图例居中\n * end - 图例在下方\n * @default 'middle'\n */\n position?: 'start' | 'middle' | 'end';\n /**\n * 图例组件的布局配置,默认自动跟随显示位置进行调整。\n * 1. `orient` 为 'top' 或者 'bottom' 时,默认为 'horizontal' 水平布局\n * 2. `orient` 为 'left' 或者 'right' 时,默认为 'vertical' 垂直布局\n */\n layout?: 'horizontal' | 'vertical';\n\n /**\n * 是否进行数据筛选,默认为 true\n */\n filter?: boolean;\n /**\n * 自定义筛选函数\n * @since 1.13.1\n * @param data 当前数据\n * @param selectedRange 选中的数据范围\n * @param datumField 筛选数据对应的字段\n * @returns 最终展示的数据\n */\n customFilter?: (data: any, selectedRange: StringOrNumber[], datumField: string) => any;\n\n /**\n * 图例标题配置\n */\n title?: ITitle;\n\n /**\n * 图例背景配置\n */\n background?: {\n /**\n * 是否绘制背景层\n */\n visible?: boolean;\n /**\n * 背景内边距\n */\n padding?: IPadding | number | number[];\n /**\n * 背景层样式\n */\n style?: Omit<NoVisibleMarkStyle<IRectMarkSpec>, 'visible' | 'width' | 'height'>;\n };\n /**\n * 是否允许交互\n * @default true\n */\n interactive?: boolean;\n} & Omit<IComponentSpec, 'orient'>;\n\nexport type ILegendSpec = IDiscreteLegendSpec | IColorLegendSpec | ISizeLegendSpec;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/marker/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { DataView } from '@visactor/vdataset';\nimport type { IPadding } from '@visactor/vutils';\nimport type {\n SymbolType,\n IGraphicAttribute,\n ICustomPath2D,\n ITextGraphicAttribute,\n IRichTextGraphicAttribute\n} from '@visactor/vrender-core';\nimport type {\n IComposedTextMarkSpec,\n IFormatMethod,\n IRectMarkSpec,\n IRichTextFormatMethod,\n ISymbolMarkSpec,\n StringOrNumber\n} from '../../typings';\nimport type { IComponentSpec } from '../base/interface';\nimport type { Datum } from '@visactor/vrender-components';\nimport type { ICartesianSeries, IGeoSeries, IPolarSeries } from '../../series/interface';\nimport type {\n IOptionAggr,\n IOptionAggrField,\n IOptionRegr,\n IOptionSeries,\n IOptionWithCoordinates\n} from '../../data/transforms/interface';\nimport type { IVChart } from '../../core/interface';\n\nexport type IMarkerSupportSeries = ICartesianSeries | IPolarSeries | IGeoSeries;\n\nexport type IPolarPoint = {\n angle: number;\n radius: number;\n};\nexport type OffsetPoint = {\n /**\n * x 方向的偏移\n * 1. number 类型表示像素值,如 12\n * 2. string 类型表示百分比,如 '10%' 表示相对于所在 region 宽度的占比\n */\n x?: number | string;\n /**\n * y 方向的偏移\n * 1. number 类型表示像素值,如 12\n * 2. string 类型表示百分比,如 '10%' 表示相对于所在 region 高度的占比\n */\n y?: number | string;\n};\n\nexport type IAggrType = 'sum' | 'average' | 'min' | 'max' | 'variance' | 'standardDeviation' | 'median';\nexport type IDataPos = StringOrNumber | IAggrType;\nexport type IDataPosCallback = (\n relativeSeriesData: Datum[],\n startRelativeSeriesData: Datum[],\n endRelativeSeriesData: Datum[],\n relativeSeries: IMarkerSupportSeries,\n startRelativeSeries: IMarkerSupportSeries,\n endRelativeSeries: IMarkerSupportSeries\n) => StringOrNumber;\n\nexport type IDataPointSpec = {\n /**\n * 数据字段配置\n */\n [key: string]: IDataPos | IDataPosCallback;\n /**\n * 具体某个数据元素关联的series序号(仅在标注目标:数据元素下有效)\n */\n refRelativeSeriesIndex?: number;\n /**\n * 具体某个数据元素关联的series 的id(仅在标注目标:数据元素下有效)\n */\n refRelativeSeriesId?: StringOrNumber;\n /**\n * 指定使用 xField 上的那个维度索引,因为 xField 字段有可能会包含多个维度,比如分组场景\n * @default 0\n * @since 1.7.0\n */\n xFieldIndex?: number;\n /**\n * 指定使用 xField 上的维度名称,因为 xField 字段有可能会包含多个维度,比如分组场景。\n * `xFieldIndex` 和 `xFieldDim` 声明一个即可,同时声明则 `xFieldDim` 优先级更高。\n * @since 1.7.0\n */\n xFieldDim?: string;\n /**\n * 指定使用 yField 上的那个维度索引,因为 yField 字段有可能会包含多个维度,比如分组场景。\n * @default 0\n * @since 1.7.0\n */\n yFieldIndex?: number;\n /**\n * 指定使用 yField 上的维度名称,因为 yField 字段有可能会包含多个维度,比如分组场景。\n * `yFieldIndex` 和 `yFieldDim` 声明一个即可,同时声明则 `yFieldDim` 优先级更高。\n * @since 1.7.0\n */\n yFieldDim?: string;\n /**\n * 指定使用 angleField 上的那个维度索引,因为 angleField 字段有可能会包含多个维度,比如分组场景\n * @default 0\n * @since 1.11.0\n */\n angleFieldIndex?: number;\n /**\n * 指定使用 angleField 上的维度名称,因为 angleField 字段有可能会包含多个维度,比如分组场景。\n * `angleFieldIndex` 和 `angleFieldDim` 声明一个即可,同时声明则 `angleFieldDim` 优先级更高。\n * @since 1.11.0\n */\n angleFieldDim?: string;\n /**\n * 指定使用 radiusField 上的那个维度索引,因为 radiusField 字段有可能会包含多个维度,比如分组场景\n * @default 0\n * @since 1.11.0\n */\n radiusFieldIndex?: number;\n /**\n * 指定使用 radiusField 上的维度名称,因为 radiusField 字段有可能会包含多个维度,比如分组场景。\n * `radiusFieldIndex` 和 `radiusFieldDim` 声明一个即可,同时声明则 `radiusFieldDim` 优先级更高。\n * @since 1.11.0\n */\n radiusFieldDim?: string;\n};\n\nexport type MarkerPositionPoint = {\n /**\n * x 坐标位置,number 类型表示像素值,string 类型表示相对画布宽度或者 region 宽度的占比(从左往右)\n */\n x: StringOrNumber;\n /**\n * y 坐标位置,number 类型表示像素值,string 类型表示相对画布高度或者 region 高度的占比(从上至下)\n */\n y: StringOrNumber;\n};\n\nexport type ICoordinateOption = {\n x?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];\n y?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];\n angle?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];\n radius?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];\n getRefRelativeSeries?: () => IMarkerSupportSeries;\n} & IOptionSeries;\n\nexport type IMarkerPositionsSpec = {\n /**\n * 画布坐标\n * `positions` 自 1.12.0 版本开始支持回调函数\n */\n positions:\n | MarkerPositionPoint[]\n | ((seriesData: Datum[], relativeSeries: IMarkerSupportSeries) => MarkerPositionPoint[]);\n /**\n * 是否为相对 region 的坐标,默认为 false,即相对画布的坐标\n * @default false\n * @since 1.7.0\n */\n regionRelative?: boolean;\n};\n\nexport type IMarkerLabelWithoutRefSpec = {\n visible?: boolean;\n /**\n * label整体 - 是否自动旋转\n */\n autoRotate?: boolean;\n /**\n * label整体 - 最小宽度,像素值\n * @default 30\n */\n minWidth?: number;\n /**\n * label整体 - 最大宽度,像素值。当文字超过最大宽度时,会自动省略。\n */\n maxWidth?: number;\n /**\n * label整体 - 背景面板配置\n */\n labelBackground?: {\n visible?: boolean;\n /**\n * 标签背景支持自定义path\n * @since 1.11.10\n */\n customShape?: (\n text: ITextGraphicAttribute | IRichTextGraphicAttribute,\n attrs: Partial<IGraphicAttribute>,\n path: ICustomPath2D\n ) => ICustomPath2D;\n /**\n * 内部边距\n */\n padding?: IPadding | number[] | number;\n } & Partial<IMarkerState<Omit<IRectMarkSpec, 'visible'>>>;\n\n /** @deprecated */\n type?: 'rich' | 'text';\n /**\n * 文本内容,如果需要进行换行,则使用数组形式,如 ['abc', '123']\n * 支持富文本内容 textConfig,设置富文本时要配置 textType 类型为 'rich'\n */\n text?: string | string[] | number | number[] | ReturnType<IRichTextFormatMethod<[]>>;\n /**\n * label文本 - 文本格式化\n * @param markData 组成标注的数据\n * @param seriesData 标注关联的数据\n * @returns 格式化后的文本\n */\n formatMethod?: IFormatMethod<[markData: Datum[], seriesData: Datum[]]>;\n\n /**\n * label文本 - 文本前 mark 图元\n */\n shape?: {\n visible?: boolean;\n style: Omit<ISymbolMarkSpec, 'visible'>;\n };\n /**\n * label文本 - shape 同文本之间的间距\n */\n space?: number;\n\n /**\n * 是否自动调整 label 使其展示在 marker 可见区域内。\n * @default false\n * @since 1.4.0\n */\n confine?: boolean;\n /**\n * 水平方向的偏移\n */\n dx?: number;\n /**\n * 垂直方向的偏移\n */\n dy?: number;\n} & Partial<IMarkerState<Omit<IComposedTextMarkSpec, 'visible'>>>; // label文本 - 文本样式\n\nexport type IMarkerLabelSpec = IMarkerLabelWithoutRefSpec & IMarkerRef;\n\nexport interface IMarkerRef {\n /**\n * label or symbol 相对line平行方向上的偏移\n */\n refX?: number;\n /**\n * label or symbol 相对line正交方向上的偏移\n */\n refY?: number;\n /**\n * label or symbol 相对默认角度的偏移 (label跟随line的角度做自动旋转时,默认按照line的平行向量作为初始角度)\n */\n refAngle?: number;\n}\n\n// 跨越系列的配置\nexport interface IMarkerCrossSeriesSpec {\n /**\n * 起点和终点关联的series(仅在标注目标:坐标空间下有效)\n */\n startRelativeSeriesIndex?: number;\n endRelativeSeriesIndex?: number;\n startRelativeSeriesId?: string;\n endRelativeSeriesId?: string;\n /**\n * 数据处理需要单独关联系列, 当配置为'all'时代表关联当前region下所有系列\n * @since 1.11.0\n */\n specifiedDataSeriesIndex?: 'all' | number | number[];\n specifiedDataSeriesId?: 'all' | string | string[];\n}\n\nexport type IMarkerSpec = IComponentSpec & {\n /**\n * 标注数据关联的series序号\n */\n relativeSeriesIndex?: number;\n /**\n * 标注数据关联系列对应的id\n */\n relativeSeriesId?: number | string;\n /**\n * marker组件是否可见\n * @default true\n */\n visible?: boolean;\n /**\n * marker组件是否可交互\n * @default true\n */\n interactive?: boolean;\n /**\n * marker组件是否自动拓展轴范围\n * @default false\n * @since 1.1.0\n */\n autoRange?: boolean;\n /**\n * marker组件超出图表区域是否被裁剪\n * @default false\n * @since 1.3.0\n */\n clip?: boolean;\n\n /**\n * 标注组件的名称标识\n * @since 1.7.0\n */\n name?: string;\n /**\n * 标注所在的坐标系类型\n * @description 一般情况下内部逻辑会根据配置自动推导类型,但如果是coordinates的配置方式,则无法推导,需要用户自行配置\n * @since 1.11.0\n */\n coordinateType?: string;\n};\n\nexport type IMarkerSymbol = IMarkerRef & {\n /** 是否展示 symbol */\n visible: boolean;\n /**\n * symbol 形状,默认为带左右方向的箭头\n */\n symbolType?: SymbolType;\n /**\n * symbol 大小\n */\n size?: number;\n} & Partial<IMarkerState<Omit<ISymbolMarkSpec, 'visible'>>>;\n\nexport type MarkerStyleCallback<T> = (\n /**\n * markerData 标注组件聚合后的数据\n */\n markerData: DataView,\n /**\n * @since 1.13.0\n * context 组件上下文, 包括相对系列,起始相对系列,结束相对系列和图表实例\n */\n context: IMarkerAttributeContext\n) => T;\nexport type MarkerStateCallback<T> = (\n /**\n * markerData 标注组件聚合后的数据\n */\n markerData: DataView,\n /**\n * @since 1.13.0\n * context 组件上下文, 包括相对系列,起始相对系列,结束相对系列和图表实例\n */\n context: IMarkerAttributeContext\n) => T;\nexport type MarkerStateValue = 'hover' | 'hover_reverse' | 'selected' | 'selected_reverse';\nexport type IMarkerState<T> = {\n /** 默认样式设置 */\n style?: T | MarkerStyleCallback<T>;\n /** 不同状态下的样式配置 */\n state?: Record<MarkerStateValue, T | MarkerStateCallback<T>>;\n};\n\nexport type MarkCoordinateType = 'cartesian' | 'polar' | 'geo';\n\nexport type IMarkProcessOptions = {\n options: IOptionAggr[] | IOptionRegr | IOptionWithCoordinates;\n needAggr?: boolean;\n needRegr?: boolean;\n processData?: DataView;\n};\n\nexport type IMarkerAttributeContext = {\n vchart: IVChart;\n relativeSeries: IMarkerSupportSeries;\n startRelativeSeries: IMarkerSupportSeries;\n endRelativeSeries: IMarkerSupportSeries;\n};\n"]}
1
+ {"version":3,"sources":["../src/component/marker/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { DataView } from '@visactor/vdataset';\nimport type { IPadding } from '@visactor/vutils';\nimport type {\n SymbolType,\n IGraphicAttribute,\n ICustomPath2D,\n ITextGraphicAttribute,\n IRichTextGraphicAttribute\n} from '@visactor/vrender-core';\nimport type {\n IComposedTextMarkSpec,\n IFormatMethod,\n IRectMarkSpec,\n IRichTextFormatMethod,\n ISymbolMarkSpec,\n StringOrNumber\n} from '../../typings';\nimport type { IComponentSpec } from '../base/interface';\nimport type { Datum } from '@visactor/vrender-components';\nimport type { ICartesianSeries, IGeoSeries, IPolarSeries } from '../../series/interface';\nimport type {\n IOptionAggr,\n IOptionAggrField,\n IOptionRegr,\n IOptionSeries,\n IOptionWithCoordinates\n} from '../../data/transforms/interface';\nimport type { IVChart } from '../../core/interface';\n\nexport type IMarkerSupportSeries = ICartesianSeries | IPolarSeries | IGeoSeries;\n\nexport type IPolarPoint = {\n angle: number;\n radius: number;\n};\nexport type OffsetPoint = {\n /**\n * x 方向的偏移\n * 1. number 类型表示像素值,如 12\n * 2. string 类型表示百分比,如 '10%' 表示相对于所在 region 宽度的占比\n */\n x?: number | string;\n /**\n * y 方向的偏移\n * 1. number 类型表示像素值,如 12\n * 2. string 类型表示百分比,如 '10%' 表示相对于所在 region 高度的占比\n */\n y?: number | string;\n};\n\nexport type IAggrType = 'sum' | 'average' | 'min' | 'max' | 'variance' | 'standardDeviation' | 'median';\nexport type IDataPos = StringOrNumber | IAggrType;\nexport type IDataPosCallback = (\n relativeSeriesData: Datum[],\n startRelativeSeriesData: Datum[],\n endRelativeSeriesData: Datum[],\n relativeSeries: IMarkerSupportSeries,\n startRelativeSeries: IMarkerSupportSeries,\n endRelativeSeries: IMarkerSupportSeries\n) => StringOrNumber;\n\nexport type IDataPointSpec = {\n /**\n * 数据字段配置\n */\n [key: string]: IDataPos | IDataPosCallback;\n /**\n * 具体某个数据元素关联的series序号(仅在标注目标:数据元素下有效)\n */\n refRelativeSeriesIndex?: number;\n /**\n * 具体某个数据元素关联的series 的id(仅在标注目标:数据元素下有效)\n */\n refRelativeSeriesId?: StringOrNumber;\n /**\n * 指定使用 xField 上的那个维度索引,因为 xField 字段有可能会包含多个维度,比如分组场景\n * @default 0\n * @since 1.7.0\n */\n xFieldIndex?: number;\n /**\n * 指定使用 xField 上的维度名称,因为 xField 字段有可能会包含多个维度,比如分组场景。\n * `xFieldIndex` 和 `xFieldDim` 声明一个即可,同时声明则 `xFieldDim` 优先级更高。\n * @since 1.7.0\n */\n xFieldDim?: string;\n /**\n * 指定使用 yField 上的那个维度索引,因为 yField 字段有可能会包含多个维度,比如分组场景。\n * @default 0\n * @since 1.7.0\n */\n yFieldIndex?: number;\n /**\n * 指定使用 yField 上的维度名称,因为 yField 字段有可能会包含多个维度,比如分组场景。\n * `yFieldIndex` 和 `yFieldDim` 声明一个即可,同时声明则 `yFieldDim` 优先级更高。\n * @since 1.7.0\n */\n yFieldDim?: string;\n /**\n * 指定使用 angleField 上的那个维度索引,因为 angleField 字段有可能会包含多个维度,比如分组场景\n * @default 0\n * @since 1.11.0\n */\n angleFieldIndex?: number;\n /**\n * 指定使用 angleField 上的维度名称,因为 angleField 字段有可能会包含多个维度,比如分组场景。\n * `angleFieldIndex` 和 `angleFieldDim` 声明一个即可,同时声明则 `angleFieldDim` 优先级更高。\n * @since 1.11.0\n */\n angleFieldDim?: string;\n /**\n * 指定使用 radiusField 上的那个维度索引,因为 radiusField 字段有可能会包含多个维度,比如分组场景\n * @default 0\n * @since 1.11.0\n */\n radiusFieldIndex?: number;\n /**\n * 指定使用 radiusField 上的维度名称,因为 radiusField 字段有可能会包含多个维度,比如分组场景。\n * `radiusFieldIndex` 和 `radiusFieldDim` 声明一个即可,同时声明则 `radiusFieldDim` 优先级更高。\n * @since 1.11.0\n */\n radiusFieldDim?: string;\n};\n\nexport type MarkerPositionPoint = {\n /**\n * x 坐标位置,number 类型表示像素值,string 类型表示相对画布宽度或者 region 宽度的占比(从左往右)\n */\n x: StringOrNumber;\n /**\n * y 坐标位置,number 类型表示像素值,string 类型表示相对画布高度或者 region 高度的占比(从上至下)\n */\n y: StringOrNumber;\n};\n\nexport type ICoordinateOption = {\n x?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];\n y?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];\n angle?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];\n radius?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];\n getRefRelativeSeries?: () => IMarkerSupportSeries;\n} & IOptionSeries;\n\nexport type IMarkerPositionsSpec = {\n /**\n * 画布坐标\n * `positions` 自 1.12.0 版本开始支持回调函数\n */\n positions:\n | MarkerPositionPoint[]\n | ((seriesData: Datum[], relativeSeries: IMarkerSupportSeries) => MarkerPositionPoint[]);\n /**\n * 是否为相对 region 的坐标,默认为 false,即相对画布的坐标\n * @default false\n * @since 1.7.0\n */\n regionRelative?: boolean;\n};\n\nexport type IMarkerLabelWithoutRefSpec = {\n /**\n * 是否展示标注标签\n */\n visible?: boolean;\n /**\n * label整体 - 是否自动旋转\n */\n autoRotate?: boolean;\n /**\n * label整体 - 最小宽度,像素值\n * @default 30\n */\n minWidth?: number;\n /**\n * label整体 - 最大宽度,像素值。当文字超过最大宽度时,会自动省略。\n */\n maxWidth?: number;\n /**\n * label整体 - 背景面板配置\n */\n labelBackground?: {\n /**\n * 标签背景是否显示,是否可见\n */\n visible?: boolean;\n /**\n * 标签背景支持自定义path\n * @since 1.11.10\n */\n customShape?: (\n text: ITextGraphicAttribute | IRichTextGraphicAttribute,\n attrs: Partial<IGraphicAttribute>,\n path: ICustomPath2D\n ) => ICustomPath2D;\n /**\n * 内部边距\n */\n padding?: IPadding | number[] | number;\n } & Partial<IMarkerState<Omit<IRectMarkSpec, 'visible'>>>;\n\n /**\n * @deprecated\n * 设置文本类型为富文本或者普通文本,已废弃\n **/\n type?: 'rich' | 'text';\n /**\n * 文本内容,如果需要进行换行,则使用数组形式,如 ['abc', '123']\n * 支持富文本内容 textConfig,设置富文本时要配置 textType 类型为 'rich'\n */\n text?: string | string[] | number | number[] | ReturnType<IRichTextFormatMethod<[]>>;\n /**\n * label文本 - 文本格式化\n * @param markData 组成标注的数据\n * @param seriesData 标注关联的数据\n * @returns 格式化后的文本\n */\n formatMethod?: IFormatMethod<[markData: Datum[], seriesData: Datum[]]>;\n\n /**\n * label文本 - 文本前 mark 图元\n */\n shape?: {\n /**\n * 是否显示标签文本前的图形\n */\n visible?: boolean;\n /**\n * 标签文本前的图形对应的样式设置\n */\n style: Omit<ISymbolMarkSpec, 'visible'>;\n };\n /**\n * label文本 - shape 同文本之间的间距\n */\n space?: number;\n\n /**\n * 是否自动调整 label 使其展示在 marker 可见区域内。\n * @default false\n * @since 1.4.0\n */\n confine?: boolean;\n /**\n * 水平方向的偏移\n */\n dx?: number;\n /**\n * 垂直方向的偏移\n */\n dy?: number;\n} & Partial<IMarkerState<Omit<IComposedTextMarkSpec, 'visible'>>>; // label文本 - 文本样式\n\nexport type IMarkerLabelSpec = IMarkerLabelWithoutRefSpec & IMarkerRef;\n\nexport interface IMarkerRef {\n /**\n * label or symbol 相对line平行方向上的偏移\n */\n refX?: number;\n /**\n * label or symbol 相对line正交方向上的偏移\n */\n refY?: number;\n /**\n * label or symbol 相对默认角度的偏移 (label跟随line的角度做自动旋转时,默认按照line的平行向量作为初始角度)\n */\n refAngle?: number;\n}\n\n// 跨越系列的配置\nexport interface IMarkerCrossSeriesSpec {\n /**\n * 设置起点关联的系列,设置该系列的序号(仅在标注目标:坐标空间下有效)\n */\n startRelativeSeriesIndex?: number;\n /**\n * 设置终点关联的系列,设置该序列的序号(仅在标注目标:坐标空间下有效)\n */\n endRelativeSeriesIndex?: number;\n /**\n * 设置起点关联的系列,设置该系列的id(仅在标注目标:坐标空间下有效)\n */\n startRelativeSeriesId?: string;\n /**\n * 设置终点关联的系列,设置该序列的id(仅在标注目标:坐标空间下有效)\n */\n endRelativeSeriesId?: string;\n /**\n * 数据处理需要单独关联系列, 设置序列的序号来进行关联,当配置为'all'时代表关联当前region下所有系列\n * @since 1.11.0\n */\n specifiedDataSeriesIndex?: 'all' | number | number[];\n /**\n * 数据处理需要单独关联系列, 设置序列的id来进行关联,当配置为'all'时代表关联当前region下所有系列\n * @since 1.11.0\n */\n specifiedDataSeriesId?: 'all' | string | string[];\n}\n\nexport type IMarkerSpec = IComponentSpec & {\n /**\n * 标注数据关联的series序号\n */\n relativeSeriesIndex?: number;\n /**\n * 标注数据关联系列对应的id\n */\n relativeSeriesId?: number | string;\n /**\n * marker组件是否可见\n * @default true\n */\n visible?: boolean;\n /**\n * marker组件是否可交互\n * @default true\n */\n interactive?: boolean;\n /**\n * marker组件是否自动拓展轴范围\n * @default false\n * @since 1.1.0\n */\n autoRange?: boolean;\n /**\n * marker组件超出图表区域是否被裁剪\n * @default false\n * @since 1.3.0\n */\n clip?: boolean;\n\n /**\n * 标注组件的名称标识\n * @since 1.7.0\n */\n name?: string;\n /**\n * 标注所在的坐标系类型\n * @description 一般情况下内部逻辑会根据配置自动推导类型,但如果是coordinates的配置方式,则无法推导,需要用户自行配置\n * @since 1.11.0\n */\n coordinateType?: string;\n};\n\nexport type IMarkerSymbol = IMarkerRef & {\n /** 是否展示 symbol */\n visible: boolean;\n /**\n * symbol 形状,默认为带左右方向的箭头\n */\n symbolType?: SymbolType;\n /**\n * symbol 大小\n */\n size?: number;\n} & Partial<IMarkerState<Omit<ISymbolMarkSpec, 'visible'>>>;\n\nexport type MarkerStyleCallback<T> = (\n /**\n * markerData 标注组件聚合后的数据\n */\n markerData: DataView,\n /**\n * @since 1.13.0\n * context 组件上下文, 包括相对系列,起始相对系列,结束相对系列和图表实例\n */\n context: IMarkerAttributeContext\n) => T;\nexport type MarkerStateCallback<T> = (\n /**\n * markerData 标注组件聚合后的数据\n */\n markerData: DataView,\n /**\n * @since 1.13.0\n * context 组件上下文, 包括相对系列,起始相对系列,结束相对系列和图表实例\n */\n context: IMarkerAttributeContext\n) => T;\nexport type MarkerStateValue = 'hover' | 'hover_reverse' | 'selected' | 'selected_reverse';\nexport type IMarkerState<T> = {\n /** 默认样式设置 */\n style?: T | MarkerStyleCallback<T>;\n /** 不同状态下的样式配置 */\n state?: Record<MarkerStateValue, T | MarkerStateCallback<T>>;\n};\n\nexport type MarkCoordinateType = 'cartesian' | 'polar' | 'geo';\n\nexport type IMarkProcessOptions = {\n options: IOptionAggr[] | IOptionRegr | IOptionWithCoordinates;\n needAggr?: boolean;\n needRegr?: boolean;\n processData?: DataView;\n};\n\nexport type IMarkerAttributeContext = {\n vchart: IVChart;\n relativeSeries: IMarkerSupportSeries;\n startRelativeSeries: IMarkerSupportSeries;\n endRelativeSeries: IMarkerSupportSeries;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/marker/mark-area/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { BaseMarkerAnimation, CommonMarkAreaAnimationType } from '@visactor/vrender-components';\nimport type { IComponent } from '../../../interface';\nimport type {\n IMarkerPositionsSpec,\n IDataPointSpec,\n IDataPos,\n IMarkerSpec,\n IDataPosCallback,\n IMarkerCrossSeriesSpec,\n OffsetPoint,\n IMarkerSupportSeries\n} from '../../interface';\nimport type { IMarkAreaTheme } from './theme';\nimport type { Datum } from '../../../../typings/common';\n\nexport type IMarkArea = IComponent;\n\nexport type IRegressType = 'regression';\n\n/**\n * 面积标注、区块标注、辅助区块相关配置\n */\nexport type IMarkAreaSpec = IMarkerSpec &\n /**\n * 标注目标:笛卡尔坐标系坐标空间\n */\n (| IMarkAreaXSpec\n | IMarkAreaYSpec\n | IMarkAreaXYSpec\n /**\n * 标注目标:极坐标系坐标空间\n * @since 1.11.0\n */\n | IMarkAreaAngleSpec\n | IMarkAreaRadiusSpec\n | IMarkAreaAngleRadiusSpec\n /**\n * 标注目标:数据元素\n */\n | IMarkAreaCoordinateSpec\n | IMarkerPositionsSpec\n ) &\n IMarkAreaTheme &\n /**\n * 动画配置\n * @since 1.11.0\n */\n BaseMarkerAnimation<CommonMarkAreaAnimationType>; // 标注目标:任意位置\n\nexport interface IMarkAreaXSpec extends IMarkerCrossSeriesSpec {\n /**\n * x轴上的参考线。可以配置参考线在x轴上的值,或者聚合计算类型\n * 可以将 x 配置为 '15%' 百分比的形式,用于表示将 x 绘制在 marker 所在 region 横轴(从左往右)的百分之 15 位置处\n */\n x: IDataPos | IDataPosCallback;\n x1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaYSpec extends IMarkerCrossSeriesSpec {\n /**\n * y轴上的参考线。可以配置参考线在y轴上的值,或者聚合计算类型\n * 可以将 y 配置为 '15%' 百分比的形式,用于表示将 y 绘制在 marker 所在 region 纵轴(从上到下)的百分之 15 位置处\n */\n y: IDataPos | IDataPosCallback;\n y1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaXYSpec extends IMarkerCrossSeriesSpec {\n /**\n * x轴上的参考线。可以配置参考线在x轴上的值,或者聚合计算类型\n * 可以将 x 配置为 '15%' 百分比的形式,用于表示将 x 绘制在 marker 所在 region 横轴(从左往右)的百分之 15 位置处\n */\n x: IDataPos | IDataPosCallback;\n x1: IDataPos | IDataPosCallback;\n /**\n * y轴上的参考线。可以配置参考线在y轴上的值,或者聚合计算类型\n * 可以将 y 配置为 '15%' 百分比的形式,用于表示将 y 绘制在 marker 所在 region 纵轴(从上到下)的百分之 15 位置处\n */\n y: IDataPos | IDataPosCallback;\n y1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaAngleSpec extends IMarkerCrossSeriesSpec {\n /**\n * 极坐标系下, angle 轴上位置,或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n angle: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, angle 轴上位置,或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n angle1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaRadiusSpec extends IMarkerCrossSeriesSpec {\n /**\n * 极坐标系下, radius 轴上位置, 或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n radius: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, radius 轴上位置, 或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n radius1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaAngleRadiusSpec extends IMarkerCrossSeriesSpec {\n /**\n * 极坐标系下, angle 轴上位置,或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n angle: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, angle 轴上位置,或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n angle1: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, radius 轴上位置, 或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n radius: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, radius 轴上位置, 或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n radius1: IDataPos | IDataPosCallback;\n}\n\nexport type IMarkAreaCoordinateSpec = {\n /**\n * 指定数据点的参考线。基于指定数据点进行参考线的绘制,可以对数据点进行数据处理\n * `coordinates` 自 1.12.0 版本开始支持回调函数\n */\n coordinates: IDataPointSpec[] | ((seriesData: Datum[], relativeSeries: IMarkerSupportSeries) => IDataPointSpec[]);\n\n /**\n * 对每个数据点转化后的画布坐标点进行偏移,该偏移值可以是像素值,也可以是 string 类型,如 '20%' 代表百分比\n * 每个元素对应一个坐标点的偏移量\n * @since 1.7.3\n */\n coordinatesOffset?: OffsetPoint[];\n};\n"]}
1
+ {"version":3,"sources":["../src/component/marker/mark-area/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { BaseMarkerAnimation, CommonMarkAreaAnimationType } from '@visactor/vrender-components';\nimport type { IComponent } from '../../../interface';\nimport type {\n IMarkerPositionsSpec,\n IDataPointSpec,\n IDataPos,\n IMarkerSpec,\n IDataPosCallback,\n IMarkerCrossSeriesSpec,\n OffsetPoint,\n IMarkerSupportSeries\n} from '../../interface';\nimport type { IMarkAreaTheme } from './theme';\nimport type { Datum } from '../../../../typings/common';\n\nexport type IMarkArea = IComponent;\n\nexport type IRegressType = 'regression';\n\n/**\n * 面积标注、区块标注、辅助区块相关配置\n */\nexport type IMarkAreaSpec = IMarkerSpec &\n /**\n * 标注目标:笛卡尔坐标系坐标空间\n */\n (| IMarkAreaXSpec\n | IMarkAreaYSpec\n | IMarkAreaXYSpec\n /**\n * 标注目标:极坐标系坐标空间\n * @since 1.11.0\n */\n | IMarkAreaAngleSpec\n | IMarkAreaRadiusSpec\n | IMarkAreaAngleRadiusSpec\n /**\n * 标注目标:数据元素\n */\n | IMarkAreaCoordinateSpec\n | IMarkerPositionsSpec\n ) &\n IMarkAreaTheme &\n /**\n * 动画配置\n * @since 1.11.0\n */\n BaseMarkerAnimation<CommonMarkAreaAnimationType>; // 标注目标:任意位置\n\nexport interface IMarkAreaXSpec extends IMarkerCrossSeriesSpec {\n /**\n * x轴上的参考线。可以配置参考线在x轴上的值,或者聚合计算类型\n * 可以将 x 配置为 '15%' 百分比的形式,用于表示将 x 绘制在 marker 所在 region 横轴(从左往右)的百分之 15 位置处\n */\n x: IDataPos | IDataPosCallback;\n /**\n * 设置x轴上的第二个值,如果同时设置了x 和 x1,会形成一个范围\n */\n x1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaYSpec extends IMarkerCrossSeriesSpec {\n /**\n * y轴上的参考线。可以配置参考线在y轴上的值,或者聚合计算类型\n * 可以将 y 配置为 '15%' 百分比的形式,用于表示将 y 绘制在 marker 所在 region 纵轴(从上到下)的百分之 15 位置处\n */\n y: IDataPos | IDataPosCallback;\n /**\n * 设置y轴上的第二个值,如果同时设置了y 和 y1,会形成一个范围\n */\n y1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaXYSpec extends IMarkerCrossSeriesSpec {\n /**\n * x轴上的参考线。可以配置参考线在x轴上的值,或者聚合计算类型\n * 可以将 x 配置为 '15%' 百分比的形式,用于表示将 x 绘制在 marker 所在 region 横轴(从左往右)的百分之 15 位置处\n */\n x: IDataPos | IDataPosCallback;\n /**\n * 设置x轴上的第二个值,如果同时设置了x 和 x1,会形成一个范围\n */\n x1: IDataPos | IDataPosCallback;\n /**\n * y轴上的参考线。可以配置参考线在y轴上的值,或者聚合计算类型\n * 可以将 y 配置为 '15%' 百分比的形式,用于表示将 y 绘制在 marker 所在 region 纵轴(从上到下)的百分之 15 位置处\n */\n y: IDataPos | IDataPosCallback;\n /**\n * 设置y轴上的第二个值,如果同时设置了y 和 y1,会形成一个范围\n */\n y1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaAngleSpec extends IMarkerCrossSeriesSpec {\n /**\n * 极坐标系下, angle 轴上位置,或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n angle: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, angle 轴上位置,或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n angle1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaRadiusSpec extends IMarkerCrossSeriesSpec {\n /**\n * 极坐标系下, radius 轴上位置, 或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n radius: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, radius 轴上位置, 或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n radius1: IDataPos | IDataPosCallback;\n}\n\nexport interface IMarkAreaAngleRadiusSpec extends IMarkerCrossSeriesSpec {\n /**\n * 极坐标系下, angle 轴上位置,或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n angle: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, angle 轴上位置,或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n angle1: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, radius 轴上位置, 或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n radius: IDataPos | IDataPosCallback;\n /**\n * 极坐标系下, radius 轴上位置, 或者聚合计算类型,或者以回调的形式通过数据自行计算。\n * @since 1.11.0\n */\n radius1: IDataPos | IDataPosCallback;\n}\n\nexport type IMarkAreaCoordinateSpec = {\n /**\n * 指定数据点的参考线。基于指定数据点进行参考线的绘制,可以对数据点进行数据处理\n * `coordinates` 自 1.12.0 版本开始支持回调函数\n */\n coordinates: IDataPointSpec[] | ((seriesData: Datum[], relativeSeries: IMarkerSupportSeries) => IDataPointSpec[]);\n\n /**\n * 对每个数据点转化后的画布坐标点进行偏移,该偏移值可以是像素值,也可以是 string 类型,如 '20%' 代表百分比\n * 每个元素对应一个坐标点的偏移量\n * @since 1.7.3\n */\n coordinatesOffset?: OffsetPoint[];\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/marker/mark-area/interface/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["import type { IMarkAreaLabelPosition, IMarkCommonArcLabelPosition } from '@visactor/vrender-components';\nimport type { IArcMarkSpec, IPolygonMarkSpec } from '../../../../typings';\nimport type { IMarkerLabelWithoutRefSpec, IMarkerState } from '../../interface';\n\nexport interface IMarkAreaTheme {\n area?: Partial<IMarkerState<IPolygonMarkSpec | IArcMarkSpec>>;\n\n label?: {\n /**\n * label整体 - 相对line的位置\n */\n position?: keyof typeof IMarkAreaLabelPosition | IMarkCommonArcLabelPosition;\n } & IMarkerLabelWithoutRefSpec;\n}\n"]}
1
+ {"version":3,"sources":["../src/component/marker/mark-area/interface/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["import type { IMarkAreaLabelPosition, IMarkCommonArcLabelPosition } from '@visactor/vrender-components';\nimport type { IArcMarkSpec, IPolygonMarkSpec } from '../../../../typings';\nimport type { IMarkerLabelWithoutRefSpec, IMarkerState } from '../../interface';\n\nexport interface IMarkAreaTheme {\n /**\n * 标记区域的样式\n */\n area?: Partial<IMarkerState<IPolygonMarkSpec | IArcMarkSpec>>;\n /**\n * 标记区域的标签样式配置\n */\n label?: {\n /**\n * label整体 - 相对line的位置\n */\n position?: keyof typeof IMarkAreaLabelPosition | IMarkCommonArcLabelPosition;\n } & IMarkerLabelWithoutRefSpec;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/title/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { IComponent } from '../../interface';\nimport type { ITextGraphicAttribute, IRichTextCharacter, ITextAttribute } from '@visactor/vrender-core';\nimport type { IOrientType, IPadding } from '../../../typings';\nimport type { IComponentSpec } from '../../base/interface';\n\ninterface ITitleSpecWithoutText extends Omit<IComponentSpec, 'orient'> {\n /**\n * 是否显示标题\n */\n visible?: boolean;\n /**\n * Title位置\n * @default 'top'\n */\n orient?: IOrientType;\n /**\n * 标题左上角x坐标像素值\n */\n x?: number;\n /**\n * 标题左上角y坐标像素值\n */\n y?: number;\n /**\n * 标题宽度\n */\n width?: number;\n /**\n * 标题高度\n */\n height?: number;\n /**\n * 最小宽度,像素值\n */\n minWidth?: number;\n /**\n * 最大宽度,像素值。当文字超过最大宽度时,会自动省略。\n */\n maxWidth?: number;\n /**\n * 最小高度,像素值\n */\n minHeight?: number;\n /**\n * 最大高度,像素值\n */\n maxHeight?: number;\n /**\n * 标题的边距留白\n */\n innerPadding?: IPadding | number | number[];\n /**\n * 文字水平对齐方式\n * 'left' | 'center' | 'right'\n */\n align?: string;\n /**\n * 文字垂直对齐方式\n * 'top' | 'middle' | 'bottom'\n */\n verticalAlign?: string;\n /**\n * 主标题样式\n */\n textStyle?: {\n width?: number;\n height?: number;\n /**\n * 文字水平对齐方式\n * 'left' | 'center' | 'right'\n */\n align?: string;\n /**\n * 文字垂直对齐方式\n * 'top' | 'middle' | 'bottom'\n */\n verticalAlign?: string;\n /**\n * 折行方式\n * 'break-word' | 'break-all' | 'keep-all'\n */\n wordBreak?: ITextAttribute['wordBreak'];\n /**\n * 按照宽度限制自动折行或显示省略号(maxLineWidth)\n * 默认设置为title宽度\n */\n maxLineWidth?: number;\n /**\n * 高度限制控制显示内容及省略号(heightLimit)\n */\n heightLimit?: number;\n /**\n * 按照行数限制显示内容及省略号(lineClamp)\n */\n lineClamp?: number;\n /**\n * 富文本配置(暂时保留旧设置)\n * @deprecated use text & textType instead\n */\n character?: IRichTextCharacter[];\n } & Partial<ITextGraphicAttribute>;\n /**\n * 副标题样式\n */\n subtextStyle?: {\n /** 指定宽度 */\n width?: number;\n /** 指定高度 */\n height?: number;\n /**\n * 文字水平对齐方式\n * 'left' | 'center' | 'right'\n */\n align?: string;\n /**\n * 文字垂直对齐方式\n * 'top' | 'middle' | 'bottom'\n */\n verticalAlign?: string;\n /**\n * 折行方式\n * 'break-word' | 'break-all' | 'keep-all\n */\n wordBreak?: ITextAttribute['wordBreak'];\n /**\n * 按照宽度限制自动折行或显示省略号(maxLineWidth)\n * 默认设置为title宽度\n */\n maxLineWidth?: number;\n /**\n * 高度限制控制显示内容及省略号(heightLimit)\n */\n heightLimit?: number;\n /**\n * 按照行数限制显示内容及省略号(lineClamp)\n */\n lineClamp?: number;\n /**\n * 富文本配置(暂时保留旧设置)\n * @deprecated use subtext & subtextType instead\n */\n character?: IRichTextCharacter[];\n } & Partial<ITextGraphicAttribute>;\n}\n\nexport type ITitleTextSpec =\n | {\n /**\n * 主标题文本类型\n */\n textType?: 'text';\n /**\n * 主标题文本配置\n */\n text: string | number | string[] | number[];\n }\n | {\n /**\n * 主标题文本类型(默认类型为text)\n */\n textType: 'rich';\n /**\n * 主标题富文本内容\n */\n text: IRichTextCharacter[];\n };\n\nexport type ISubTitleTextSpec =\n | {\n /**\n * 副标题文本类型\n */\n subtextType?: 'text';\n /**\n * 副标题文本内容\n */\n subtext?: string | number | string[] | number[];\n }\n | {\n /**\n * 副标题文本类型\n */\n subtextType?: 'rich';\n\n /**\n * 副标题富文本内容\n */\n subtext?: IRichTextCharacter[];\n };\n\nexport type ITitleSpec = ITitleSpecWithoutText & ITitleTextSpec & ISubTitleTextSpec;\n\nexport type ITitle = IComponent;\n"]}
1
+ {"version":3,"sources":["../src/component/title/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { IComponent } from '../../interface';\nimport type { ITextGraphicAttribute, IRichTextCharacter, ITextAttribute } from '@visactor/vrender-core';\nimport type { IOrientType, IPadding } from '../../../typings';\nimport type { IComponentSpec } from '../../base/interface';\n\ninterface ITitleSpecWithoutText extends Omit<IComponentSpec, 'orient'> {\n /**\n * 是否显示标题\n */\n visible?: boolean;\n /**\n * Title位置\n * @default 'top'\n */\n orient?: IOrientType;\n /**\n * 标题左上角x坐标像素值\n */\n x?: number;\n /**\n * 标题左上角y坐标像素值\n */\n y?: number;\n /**\n * 标题宽度\n */\n width?: number;\n /**\n * 标题高度\n */\n height?: number;\n /**\n * 最小宽度,像素值\n */\n minWidth?: number;\n /**\n * 最大宽度,像素值。当文字超过最大宽度时,会自动省略。\n */\n maxWidth?: number;\n /**\n * 最小高度,像素值\n */\n minHeight?: number;\n /**\n * 最大高度,像素值\n */\n maxHeight?: number;\n /**\n * 标题的边距留白\n */\n innerPadding?: IPadding | number | number[];\n /**\n * 文字水平对齐方式\n * 'left' | 'center' | 'right'\n */\n align?: string;\n /**\n * 文字垂直对齐方式\n * 'top' | 'middle' | 'bottom'\n */\n verticalAlign?: string;\n /**\n * 主标题样式\n */\n textStyle?: {\n /**\n * 给主标题设置给定的宽度\n */\n width?: number;\n /**\n * 给主标题设置给定的高度\n */\n height?: number;\n /**\n * 文字水平对齐方式\n * 'left' | 'center' | 'right'\n */\n align?: string;\n /**\n * 文字垂直对齐方式\n * 'top' | 'middle' | 'bottom'\n */\n verticalAlign?: string;\n /**\n * 折行方式\n * 'break-word' | 'break-all' | 'keep-all'\n */\n wordBreak?: ITextAttribute['wordBreak'];\n /**\n * 按照宽度限制自动折行或显示省略号(maxLineWidth)\n * 默认设置为title宽度\n */\n maxLineWidth?: number;\n /**\n * 高度限制控制显示内容及省略号(heightLimit)\n */\n heightLimit?: number;\n /**\n * 按照行数限制显示内容及省略号(lineClamp)\n */\n lineClamp?: number;\n /**\n * 富文本配置(暂时保留旧设置)\n * @deprecated use text & textType instead\n */\n character?: IRichTextCharacter[];\n } & Partial<ITextGraphicAttribute>;\n /**\n * 副标题样式\n */\n subtextStyle?: {\n /** 指定宽度 */\n width?: number;\n /** 指定高度 */\n height?: number;\n /**\n * 文字水平对齐方式\n * 'left' | 'center' | 'right'\n */\n align?: string;\n /**\n * 文字垂直对齐方式\n * 'top' | 'middle' | 'bottom'\n */\n verticalAlign?: string;\n /**\n * 折行方式\n * 'break-word' | 'break-all' | 'keep-all\n */\n wordBreak?: ITextAttribute['wordBreak'];\n /**\n * 按照宽度限制自动折行或显示省略号(maxLineWidth)\n * 默认设置为title宽度\n */\n maxLineWidth?: number;\n /**\n * 高度限制控制显示内容及省略号(heightLimit)\n */\n heightLimit?: number;\n /**\n * 按照行数限制显示内容及省略号(lineClamp)\n */\n lineClamp?: number;\n /**\n * 富文本配置(暂时保留旧设置)\n * @deprecated use subtext & subtextType instead\n */\n character?: IRichTextCharacter[];\n } & Partial<ITextGraphicAttribute>;\n}\n\nexport type ITitleTextSpec =\n | {\n /**\n * 主标题文本类型\n */\n textType?: 'text';\n /**\n * 主标题文本配置\n */\n text: string | number | string[] | number[];\n }\n | {\n /**\n * 主标题文本类型(默认类型为text)\n */\n textType: 'rich';\n /**\n * 主标题富文本内容\n */\n text: IRichTextCharacter[];\n };\n\nexport type ISubTitleTextSpec =\n | {\n /**\n * 副标题文本类型\n */\n subtextType?: 'text';\n /**\n * 副标题文本内容\n */\n subtext?: string | number | string[] | number[];\n }\n | {\n /**\n * 副标题文本类型\n */\n subtextType?: 'rich';\n\n /**\n * 副标题富文本内容\n */\n subtext?: IRichTextCharacter[];\n };\n\nexport type ITitleSpec = ITitleSpecWithoutText & ITitleTextSpec & ISubTitleTextSpec;\n\nexport type ITitle = IComponent;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/tooltip/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { EventSourceType, EventType } from '../../../event/interface';\nimport type {\n IGroupTooltipPattern,\n ITooltipActual,\n ITooltipPattern,\n Maybe,\n MaybeArray,\n TooltipActiveType,\n TooltipData\n} from '../../../typings';\nimport type { ITooltipActiveTypeAsKeys, TooltipHandlerParams, TooltipResult } from './common';\nimport type { ITooltipTheme } from './theme';\n\nexport interface ITooltipSpec\n extends Partial<\n /**\n * mark tooltip pattern\n * & dimension tooltip pattern\n * (*支持在series上设置)\n */\n ITooltipActiveTypeAsKeys<\n ITooltipPattern & {\n checkOverlap?: boolean;\n },\n ITooltipPattern,\n IGroupTooltipPattern\n >\n > {\n /**\n * 是否显示\n * (*支持在series上设置)\n * (*会影响自定义handler)\n */\n visible?: boolean;\n /**\n * 受支持的激活类型\n * (*支持在series上设置)\n * (*会影响自定义handler)\n */\n activeType?: TooltipActiveType | TooltipActiveType[];\n /**\n * tooltip触发方式\n * (*会影响自定义handler)\n * @since 1.12.10 支持自定义的事件触发\n */\n trigger?:\n | MaybeArray<'hover' | 'click' | { eventType: EventType; source?: EventSourceType; consume?: boolean }>\n | 'none';\n /**\n * 隐藏tooltip的触发方式(目前仅支持和trigger一致的设置以及none)\n * (*会影响自定义handler)\n * @since 1.12.10 支持自定义的事件触发\n */\n triggerOff?:\n | MaybeArray<\n | 'hover'\n | 'click'\n | { eventType: EventType; source?: EventSourceType; consume?: boolean; checkOutside?: boolean }\n >\n | 'none';\n /**\n * 当设置了`enterable: true`,且 trigger类型为`hover`的时候,为了方便鼠标进入提示信息的内容区域,设置的显示延迟时长\n * 其他情况设置无效\n * @since 1.12.8\n */\n showDelay?: number;\n\n /**\n * 隐藏计时器\n * @since 1.11.7\n */\n hideTimer?: number;\n /**\n * 点击后锁定,只有点击才可以更新位置或者解锁,通常用于 trigger 为 `['hover', 'click']` 的场景\n * (*会影响自定义handler)\n * @since 1.10.0\n */\n lockAfterClick?: boolean;\n /**\n * tooltip样式,是现在支持的三种类型的tooltip组件(包括dimension、mark、group)的公共样式\n */\n style?: Omit<ITooltipTheme<string>, 'offset' | 'transitionDuration'>;\n\n /**\n * 自定义handler方法\n */\n handler?: Partial<ITooltipHandlerSpec>;\n\n /**\n * tooltip 渲染方式,默认为 html\n */\n renderMode?: 'html' | 'canvas';\n /**\n * 是否将 tooltip 框限制在画布区域内,renderMode 为 canvas 时,默认开启。\n */\n confine?: boolean;\n\n /**\n * tooltip dom元素的 className,仅当 renderMode: 'html' 时生效\n */\n className?: string;\n /**\n * tooltip dom 元素的挂载点,可传 id 或 dom 对象\n */\n parentElement?: Maybe<string | HTMLElement | HTMLCanvasElement>;\n /**\n * 鼠标是否可进入提示框浮层中,默认为false,如需详情内交互,如添加链接,按钮,可设置为 true。\n * 该属性目前只对 renderMode 为 html 时生效\n * TODO: 支持 renderMode: canvas\n */\n enterable?: boolean;\n\n /**\n * 浮层移动动画过渡时间,单位是 ms,设置为 0 的时候会紧跟着鼠标移动(目前仅影响 dom tooltip)\n */\n transitionDuration?: number;\n\n /**\n * 更新 tooltip 的防抖动时间间隔,单位是 ms\n */\n throttleInterval?: number;\n\n /**\n * 更新 tooltip dom 元素,仅当 renderMode: 'html' 时生效\n * @since 1.6.0\n */\n updateElement?: (tooltipElement: HTMLElement, actualTooltip: ITooltipActual, params: TooltipHandlerParams) => void;\n /**\n * 计算tooltip位置时候的偏移量\n */\n offset?: {\n x?: number;\n y?: number;\n };\n}\n\ntype ISeriesToolipPattern = Pick<\n ITooltipPattern,\n | 'visible'\n | 'title'\n | 'content'\n | 'hasShape'\n | 'shapeColor'\n | 'shapeFill'\n | 'shapeHollow'\n | 'shapeLineWidth'\n | 'shapeSize'\n | 'shapeStroke'\n | 'shapeType'\n | 'updateContent'\n | 'updateTitle'\n | 'updatePosition'\n>;\n\n/**\n * 系列上的tooltip配置,优先级高于全局tooltip配置\n * 对于visible相当配置,系列tooltip只能关闭,不能覆盖全局tooltip配置\n */\nexport interface ISeriesTooltipSpec extends Pick<ITooltipSpec, 'visible' | 'activeType' | 'handler'> {\n /**\n * 该系列数据在dimension tooltip中特有的配置\n */\n dimension?: ISeriesToolipPattern;\n /**\n * 该系列数据在mark tooltip中特有的配置\n */\n mark?: ISeriesToolipPattern;\n /**\n * 该系列数据在group tooltip中特有的配置\n */\n group?: Pick<IGroupTooltipPattern, 'triggerMark'> & ISeriesToolipPattern;\n}\n\nexport interface ITooltipHandlerSpec {\n /** 显示 tooltip,可以选择返回是否遇到异常 */\n showTooltip: (\n activeType: TooltipActiveType,\n tooltipData: TooltipData,\n params: TooltipHandlerParams\n ) => Maybe<TooltipResult>;\n /** 隐藏 tooltip,可以选择返回是否遇到异常 */\n hideTooltip: (params: TooltipHandlerParams) => Maybe<TooltipResult>;\n /** 释放 tooltip */\n release: () => void;\n /** 可选,判断 tooltip 是否正在显示 */\n isTooltipShown?: () => boolean;\n}\n"]}
1
+ {"version":3,"sources":["../src/component/tooltip/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { EventSourceType, EventType } from '../../../event/interface';\nimport type {\n IGroupTooltipPattern,\n ITooltipActual,\n ITooltipPattern,\n Maybe,\n MaybeArray,\n TooltipActiveType,\n TooltipData\n} from '../../../typings';\nimport type { ITooltipActiveTypeAsKeys, TooltipHandlerParams, TooltipResult } from './common';\nimport type { ITooltipTheme } from './theme';\n\nexport interface ITooltipSpec\n extends Partial<\n /**\n * mark tooltip pattern\n * & dimension tooltip pattern\n * (*支持在series上设置)\n */\n ITooltipActiveTypeAsKeys<\n ITooltipPattern & {\n /**\n * mark tooltip是否展示触发点所在的所有图形的数据\n */\n checkOverlap?: boolean;\n },\n ITooltipPattern,\n IGroupTooltipPattern\n >\n > {\n /**\n * 是否显示\n * (*支持在series上设置)\n * (*会影响自定义handler)\n */\n visible?: boolean;\n /**\n * 受支持的激活类型\n * (*支持在series上设置)\n * (*会影响自定义handler)\n */\n activeType?: TooltipActiveType | TooltipActiveType[];\n /**\n * tooltip触发方式\n * (*会影响自定义handler)\n * @since 1.12.10 支持自定义的事件触发\n */\n trigger?:\n | MaybeArray<'hover' | 'click' | { eventType: EventType; source?: EventSourceType; consume?: boolean }>\n | 'none';\n /**\n * 隐藏tooltip的触发方式(目前仅支持和trigger一致的设置以及none)\n * (*会影响自定义handler)\n * @since 1.12.10 支持自定义的事件触发\n */\n triggerOff?:\n | MaybeArray<\n | 'hover'\n | 'click'\n | { eventType: EventType; source?: EventSourceType; consume?: boolean; checkOutside?: boolean }\n >\n | 'none';\n /**\n * 当设置了`enterable: true`,且 trigger类型为`hover`的时候,为了方便鼠标进入提示信息的内容区域,设置的显示延迟时长\n * 其他情况设置无效\n * @since 1.12.8\n */\n showDelay?: number;\n\n /**\n * 隐藏计时器\n * @since 1.11.7\n */\n hideTimer?: number;\n /**\n * 点击后锁定,只有点击才可以更新位置或者解锁,通常用于 trigger 为 `['hover', 'click']` 的场景\n * (*会影响自定义handler)\n * @since 1.10.0\n */\n lockAfterClick?: boolean;\n /**\n * tooltip样式,是现在支持的三种类型的tooltip组件(包括dimension、mark、group)的公共样式\n */\n style?: Omit<ITooltipTheme<string>, 'offset' | 'transitionDuration'>;\n\n /**\n * 自定义handler方法\n */\n handler?: Partial<ITooltipHandlerSpec>;\n\n /**\n * tooltip 渲染方式,默认为 html\n */\n renderMode?: 'html' | 'canvas';\n /**\n * 是否将 tooltip 框限制在画布区域内,renderMode 为 canvas 时,默认开启。\n */\n confine?: boolean;\n\n /**\n * tooltip dom元素的 className,仅当 renderMode: 'html' 时生效\n */\n className?: string;\n /**\n * tooltip dom 元素的挂载点,可传 id 或 dom 对象\n */\n parentElement?: Maybe<string | HTMLElement | HTMLCanvasElement>;\n /**\n * 鼠标是否可进入提示框浮层中,默认为false,如需详情内交互,如添加链接,按钮,可设置为 true。\n * 该属性目前只对 renderMode 为 html 时生效\n * TODO: 支持 renderMode: canvas\n */\n enterable?: boolean;\n\n /**\n * 浮层移动动画过渡时间,单位是 ms,设置为 0 的时候会紧跟着鼠标移动(目前仅影响 dom tooltip)\n */\n transitionDuration?: number;\n\n /**\n * 更新 tooltip 的防抖动时间间隔,单位是 ms\n */\n throttleInterval?: number;\n\n /**\n * 更新 tooltip dom 元素,仅当 renderMode: 'html' 时生效\n * @since 1.6.0\n */\n updateElement?: (tooltipElement: HTMLElement, actualTooltip: ITooltipActual, params: TooltipHandlerParams) => void;\n /**\n * 计算tooltip位置时候的偏移量\n */\n offset?: {\n /**\n * x 方向的偏移量\n */\n x?: number;\n /**\n * y 方向的偏移量\n */\n y?: number;\n };\n}\n\ntype ISeriesToolipPattern = Pick<\n ITooltipPattern,\n | 'visible'\n | 'title'\n | 'content'\n | 'hasShape'\n | 'shapeColor'\n | 'shapeFill'\n | 'shapeHollow'\n | 'shapeLineWidth'\n | 'shapeSize'\n | 'shapeStroke'\n | 'shapeType'\n | 'updateContent'\n | 'updateTitle'\n | 'updatePosition'\n>;\n\n/**\n * 系列上的tooltip配置,优先级高于全局tooltip配置\n * 对于visible相当配置,系列tooltip只能关闭,不能覆盖全局tooltip配置\n */\nexport interface ISeriesTooltipSpec extends Pick<ITooltipSpec, 'visible' | 'activeType' | 'handler'> {\n /**\n * 该系列数据在dimension tooltip中特有的配置\n */\n dimension?: ISeriesToolipPattern;\n /**\n * 该系列数据在mark tooltip中特有的配置\n */\n mark?: ISeriesToolipPattern;\n /**\n * 该系列数据在group tooltip中特有的配置\n */\n group?: Pick<IGroupTooltipPattern, 'triggerMark'> & ISeriesToolipPattern;\n}\n\nexport interface ITooltipHandlerSpec {\n /** 显示 tooltip,可以选择返回是否遇到异常 */\n showTooltip: (\n activeType: TooltipActiveType,\n tooltipData: TooltipData,\n params: TooltipHandlerParams\n ) => Maybe<TooltipResult>;\n /** 隐藏 tooltip,可以选择返回是否遇到异常 */\n hideTooltip: (params: TooltipHandlerParams) => Maybe<TooltipResult>;\n /** 释放 tooltip */\n release: () => void;\n /** 可选,判断 tooltip 是否正在显示 */\n isTooltipShown?: () => boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/tooltip/interface/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["import type { ITextAttribute } from '@visactor/vrender-core';\nimport type { ILayoutNumber, ITooltipShapePattern, StringOrNumber, TextAlign, TextBaseLine } from '../../../typings';\nimport type { Padding } from '@visactor/vrender-components';\nimport type { ITokenKey } from '../../../theme/token/interface';\n\nexport interface ITooltipTextTheme<ColorType = string> {\n /** 字体 */\n fontFamily?: string;\n /** 字体大小 */\n fontSize?: number | ITokenKey;\n /** 字体颜色 */\n fill?: ColorType;\n /** @deprecated 字体颜色(兼容旧版本) */\n fontColor?: ColorType;\n /** 字重 */\n fontWeight?: StringOrNumber;\n /** 对齐方式 */\n textAlign?: TextAlign;\n /** 字体基线 */\n textBaseline?: TextBaseLine;\n /** 行高 */\n lineHeight?: number | string | ITokenKey;\n /** 与相邻元素的水平间距 */\n spacing?: number;\n /** 是否支持换行 */\n multiLine?: boolean;\n /** 最大宽度 */\n maxWidth?: number;\n /** 换行模式,默认为'break-word' */\n wordBreak?: ITextAttribute['wordBreak'];\n /**\n * 是否开启自动宽度。效果分为以下几种情况:\n * - tooltip 标题:`autoWidth` 默认为 `false`。如果配置为 `true`,则 tooltip 标题会保持和 tooltip 内容一致的宽度\n * - tooltip key 标签:`autoWidth` 不适用\n * - tooltip value 标签:`autoWidth` 默认为 `true`。如果配置为 `true`,则 tooltip value 标签会自动占满 tooltip 整体宽度的剩余部分\n * @since 1.4.2\n */\n autoWidth?: boolean;\n}\n\nexport interface ITooltipTheme<ColorType = string> {\n /** 容器样式配置 */\n panel?: {\n /** tooltip 容器内边距 */\n padding?: Padding;\n /** 背景色 */\n backgroundColor?: ColorType;\n /** tooltip边框 */\n border?: {\n color?: ColorType;\n width?: number;\n /** 圆角 */\n radius?: number;\n };\n /** tooltip阴影 */\n shadow?: {\n x: number;\n y: number;\n blur: number;\n spread: number;\n color: ColorType;\n };\n };\n shape?: {\n /** 标记大小 */\n size?: number;\n /** shape 与相邻元素的水平间距 */\n spacing?: number;\n } & Omit<ITooltipShapePattern, 'seriesId'>;\n /** tooltip标题 */\n titleLabel?: ITooltipTextTheme<ColorType>;\n /** tooltip内容,key字段 */\n keyLabel?: Omit<ITooltipTextTheme<ColorType>, 'autoWidth'>;\n /** tooltip内容,value字段 */\n valueLabel?: ITooltipTextTheme<ColorType>;\n /** 内容项行间距 */\n spaceRow?: number;\n /**\n * 最大内容区高度,内容区若超过该高度将显示局部滚动条(适用于 dom tooltip)\n * @since 1.9.0\n * @since 1.13.0 支持百分比的高度,当配置为百分比的时候,会根据图表的高度,body的最大高度,计算出来一个相对高度\n */\n maxContentHeight?: ILayoutNumber;\n /** 偏移量 */\n offset?: {\n x?: number;\n y?: number;\n };\n /**\n * 浮层移动动画过渡时间,单位是 ms,设置为 0 的时候会紧跟着鼠标移动(目前仅影响 dom tooltip)\n * @since 1.11.9\n */\n transitionDuration?: number;\n /**\n * @since 1.11.5\n *\n * shape、key、value的对齐方式,可选项如下:\n * 'left': 从左到右对齐\n * 'right': 从右到左对齐\n */\n align?: 'left' | 'right';\n}\n"]}
1
+ {"version":3,"sources":["../src/component/tooltip/interface/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["import type { ITextAttribute } from '@visactor/vrender-core';\nimport type { ILayoutNumber, ITooltipShapePattern, StringOrNumber, TextAlign, TextBaseLine } from '../../../typings';\nimport type { Padding } from '@visactor/vrender-components';\nimport type { ITokenKey } from '../../../theme/token/interface';\n\nexport interface ITooltipTextTheme<ColorType = string> {\n /**\n * 字体\n */\n fontFamily?: string;\n /**\n * 字体大小\n */\n fontSize?: number | ITokenKey;\n /**\n * 字体颜色\n */\n fill?: ColorType;\n /**\n * 字体颜色(兼容旧版本)\n * @deprecated\n */\n fontColor?: ColorType;\n /**\n * 字重\n */\n fontWeight?: StringOrNumber;\n /**\n * 对齐方式\n */\n textAlign?: TextAlign;\n /**\n * 字体基线\n */\n textBaseline?: TextBaseLine;\n /**\n * 行高\n */\n lineHeight?: number | string | ITokenKey;\n /**\n * 与相邻元素的水平间距\n */\n spacing?: number;\n /**\n * 是否支持换行\n */\n multiLine?: boolean;\n /**\n * 最大宽度\n */\n maxWidth?: number;\n /**\n * 换行模式,默认为'break-word'\n */\n wordBreak?: ITextAttribute['wordBreak'];\n /**\n * 是否开启自动宽度。效果分为以下几种情况:\n * - tooltip 标题:`autoWidth` 默认为 `false`。如果配置为 `true`,则 tooltip 标题会保持和 tooltip 内容一致的宽度\n * - tooltip key 标签:`autoWidth` 不适用\n * - tooltip value 标签:`autoWidth` 默认为 `true`。如果配置为 `true`,则 tooltip value 标签会自动占满 tooltip 整体宽度的剩余部分\n * @since 1.4.2\n */\n autoWidth?: boolean;\n}\n\nexport interface ITooltipTheme<ColorType = string> {\n /** 容器样式配置 */\n panel?: {\n /** tooltip 容器内边距 */\n padding?: Padding;\n /** 背景色 */\n backgroundColor?: ColorType;\n /** tooltip边框 */\n border?: {\n color?: ColorType;\n width?: number;\n /** 圆角 */\n radius?: number;\n };\n /** tooltip阴影 */\n shadow?: {\n x: number;\n y: number;\n blur: number;\n spread: number;\n color: ColorType;\n };\n };\n /**\n * 设置 tooltip 中 shape 的样式\n */\n shape?: {\n /** 标记大小 */\n size?: number;\n /** shape 与相邻元素的水平间距 */\n spacing?: number;\n } & Omit<ITooltipShapePattern, 'seriesId'>;\n /** tooltip标题 */\n titleLabel?: ITooltipTextTheme<ColorType>;\n /** tooltip内容,key字段 */\n keyLabel?: Omit<ITooltipTextTheme<ColorType>, 'autoWidth'>;\n /** tooltip内容,value字段 */\n valueLabel?: ITooltipTextTheme<ColorType>;\n /** 内容项行间距 */\n spaceRow?: number;\n /**\n * 最大内容区高度,内容区若超过该高度将显示局部滚动条(适用于 dom tooltip)\n * @since 1.9.0\n * @since 1.13.0 支持百分比的高度,当配置为百分比的时候,会根据图表的高度,body的最大高度,计算出来一个相对高度\n */\n maxContentHeight?: ILayoutNumber;\n /** 偏移量 */\n offset?: {\n x?: number;\n y?: number;\n };\n /**\n * 浮层移动动画过渡时间,单位是 ms,设置为 0 的时候会紧跟着鼠标移动(目前仅影响 dom tooltip)\n * @since 1.11.9\n */\n transitionDuration?: number;\n /**\n * shape、key、value的对齐方式,可选项如下:\n * 'left': 从左到右对齐\n * 'right': 从右到左对齐\n * @since 1.11.5\n */\n align?: 'left' | 'right';\n}\n"]}
@@ -41,7 +41,7 @@ export class Tooltip extends BaseComponent {
41
41
  }, this._handleClickToLock = params => {
42
42
  this._clickLock ? (this._handleChartMouseOut(params), this._clickLock = !1) : this._clickLock = !0;
43
43
  }, this._getMouseOutHandler = needPointerDetection => params => {
44
- var _a, _b, _c, _d;
44
+ var _a, _b, _c, _d, _e;
45
45
  if (this._isReleased) return;
46
46
  if (this._alwaysShow || this._clickLock) return;
47
47
  if (!this._isTooltipShown && !(null === (_b = null === (_a = this.tooltipHandler) || void 0 === _a ? void 0 : _a.isTooltipShown) || void 0 === _b ? void 0 : _b.call(_a))) return;
@@ -51,23 +51,24 @@ export class Tooltip extends BaseComponent {
51
51
  y: clientY
52
52
  }) || (this._enterable ? this._outTimer = setTimeout((() => {
53
53
  this._handleChartMouseOut(params);
54
- }), null !== (_d = this._spec.showDelay) && void 0 !== _d ? _d : DEFAULT_SHOW_DELAY) : this._handleChartMouseOut(params));
54
+ }), null !== (_e = null === (_d = this._spec) || void 0 === _d ? void 0 : _d.showDelay) && void 0 !== _e ? _e : DEFAULT_SHOW_DELAY) : this._handleChartMouseOut(params));
55
55
  }, this._handleChartMouseOut = params => {
56
- this._alwaysShow || "none" !== this._spec.triggerOff && (this._hideTooltipByHandler(Object.assign(Object.assign({}, params), {
56
+ this._alwaysShow || this._isReleased || "none" !== this._spec.triggerOff && (this._hideTooltipByHandler(Object.assign(Object.assign({}, params), {
57
57
  tooltip: this
58
58
  })), this._handleMouseMove && this._handleMouseMove.cancel && this._handleMouseMove.cancel(),
59
59
  this._cacheEnterableRect = null, this._cacheInfo = void 0, this._cacheParams = void 0,
60
60
  this._cacheActiveType = void 0);
61
61
  }, this._getMouseMoveHandler = isClick => params => {
62
- var _a, _b, _c;
62
+ var _a, _b, _c, _d;
63
63
  this._isReleased || (this._outTimer && (clearTimeout(this._outTimer), this._outTimer = null),
64
64
  this.tooltipHandler || this._initHandler(), this.processor || this._initProcessor(),
65
65
  this._alwaysShow || (this._clickLock ? isClick && (this._handleChartMouseOut(params),
66
66
  this._clickLock = !1) : !isClick && this._enterable && (null === (_b = null === (_a = this.tooltipHandler) || void 0 === _a ? void 0 : _a.isTooltipShown) || void 0 === _b ? void 0 : _b.call(_a)) ? (this._showTimer && clearTimeout(this._showTimer),
67
67
  this._showTimer = setTimeout((() => {
68
68
  this._handleChartMouseMove(params, isClick);
69
- }), null !== (_c = this._spec.showDelay) && void 0 !== _c ? _c : DEFAULT_SHOW_DELAY)) : this._handleChartMouseMove(params, isClick)));
69
+ }), null !== (_d = null === (_c = this._spec) || void 0 === _c ? void 0 : _c.showDelay) && void 0 !== _d ? _d : DEFAULT_SHOW_DELAY)) : this._handleChartMouseMove(params, isClick)));
70
70
  }, this._handleChartMouseMove = (params, isClick) => {
71
+ if (this._isReleased) return;
71
72
  const mouseEventData = this._getMouseEventData(params), {tooltipInfo: {dimension: dimensionInfo}, ignore: {mark: ignoreMark}} = mouseEventData, success = {
72
73
  mark: !1,
73
74
  dimension: !1,
@@ -123,6 +124,7 @@ export class Tooltip extends BaseComponent {
123
124
  }
124
125
  return 1;
125
126
  }, this.hideTooltip = () => {
127
+ if (this._isReleased) return !1;
126
128
  const params = {
127
129
  changePositionOnly: !1,
128
130
  tooltip: this,
@@ -194,11 +196,11 @@ export class Tooltip extends BaseComponent {
194
196
  }), this._outTimer && (clearTimeout(this._outTimer), this._outTimer = null), this._showTimer && (clearTimeout(this._showTimer),
195
197
  this._showTimer = null);
196
198
  })), element.addEventListener("pointerleave", (() => {
197
- var _a, _b;
199
+ var _a, _b, _c;
198
200
  if (this._enterable && this._cacheEnterableRect) {
199
201
  const newRect = null === (_a = element.getBoundingClientRect) || void 0 === _a ? void 0 : _a.call(element);
200
202
  newRect && Object.keys(this._cacheEnterableRect).every((k => this._cacheEnterableRect[k] === newRect[k])) && (this._cacheEnterableRect = null,
201
- this._outTimer = setTimeout(this.hideTooltip, null !== (_b = this._spec.showDelay) && void 0 !== _b ? _b : DEFAULT_SHOW_DELAY));
203
+ this._outTimer = setTimeout(this.hideTooltip, null !== (_c = null === (_b = this._spec) || void 0 === _b ? void 0 : _b.showDelay) && void 0 !== _c ? _c : DEFAULT_SHOW_DELAY));
202
204
  }
203
205
  })), this._needInitEventOfTooltip = !1);
204
206
  }