@antv/g2plot 2.4.8 → 2.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +1 -1
- package/dist/g2plot.min.js +4 -4
- package/dist/g2plot.min.js.map +1 -1
- package/esm/core/plot.d.ts +2 -2
- package/esm/core/plot.js +4 -3
- package/esm/core/plot.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -2
- package/esm/index.js.map +1 -1
- package/esm/plots/area/types.d.ts +35 -10
- package/esm/plots/area/types.js.map +1 -1
- package/esm/plots/bar/types.d.ts +16 -3
- package/esm/plots/bar/types.js.map +1 -1
- package/esm/plots/bidirectional-bar/types.d.ts +21 -6
- package/esm/plots/bidirectional-bar/types.js.map +1 -1
- package/esm/plots/box/types.d.ts +20 -6
- package/esm/plots/box/types.js.map +1 -1
- package/esm/plots/bullet/types.d.ts +36 -9
- package/esm/plots/bullet/types.js.map +1 -1
- package/esm/plots/chord/types.d.ts +14 -10
- package/esm/plots/chord/types.js.map +1 -1
- package/esm/plots/circle-packing/types.d.ts +25 -8
- package/esm/plots/circle-packing/types.js.map +1 -1
- package/esm/plots/column/types.d.ts +57 -16
- package/esm/plots/column/types.js.map +1 -1
- package/esm/plots/dual-axes/types.d.ts +31 -6
- package/esm/plots/dual-axes/types.js.map +1 -1
- package/esm/plots/facet/types.d.ts +54 -34
- package/esm/plots/facet/types.js.map +1 -1
- package/esm/plots/funnel/geometries/compare.js +2 -1
- package/esm/plots/funnel/geometries/compare.js.map +1 -1
- package/esm/plots/funnel/geometries/facet.js +2 -1
- package/esm/plots/funnel/geometries/facet.js.map +1 -1
- package/esm/plots/funnel/types.d.ts +45 -11
- package/esm/plots/funnel/types.js.map +1 -1
- package/esm/plots/gauge/adaptor.js +31 -3
- package/esm/plots/gauge/adaptor.js.map +1 -1
- package/esm/plots/gauge/types.d.ts +84 -22
- package/esm/plots/gauge/types.js.map +1 -1
- package/esm/plots/heatmap/types.d.ts +47 -12
- package/esm/plots/heatmap/types.js.map +1 -1
- package/esm/plots/histogram/types.d.ts +17 -6
- package/esm/plots/histogram/types.js.map +1 -1
- package/esm/plots/line/types.d.ts +42 -12
- package/esm/plots/line/types.js.map +1 -1
- package/esm/plots/liquid/index.d.ts +1 -0
- package/esm/plots/liquid/index.js +1 -0
- package/esm/plots/liquid/index.js.map +1 -1
- package/esm/plots/liquid/shapes/liquid.d.ts +16 -1
- package/esm/plots/liquid/shapes/liquid.js +13 -8
- package/esm/plots/liquid/shapes/liquid.js.map +1 -1
- package/esm/plots/liquid/types.d.ts +56 -16
- package/esm/plots/liquid/types.js.map +1 -1
- package/esm/plots/mix/types.d.ts +31 -22
- package/esm/plots/mix/types.js.map +1 -1
- package/esm/plots/pie/types.d.ts +27 -10
- package/esm/plots/pie/types.js.map +1 -1
- package/esm/plots/progress/types.d.ts +13 -4
- package/esm/plots/progress/types.js.map +1 -1
- package/esm/plots/radar/types.d.ts +39 -12
- package/esm/plots/radar/types.js.map +1 -1
- package/esm/plots/radial-bar/types.d.ts +39 -12
- package/esm/plots/radial-bar/types.js.map +1 -1
- package/esm/plots/ring-progress/types.d.ts +18 -6
- package/esm/plots/ring-progress/types.js.map +1 -1
- package/esm/plots/rose/types.d.ts +32 -12
- package/esm/plots/rose/types.js.map +1 -1
- package/esm/plots/sankey/types.d.ts +51 -32
- package/esm/plots/sankey/types.js.map +1 -1
- package/esm/plots/scatter/types.d.ts +76 -22
- package/esm/plots/scatter/types.js.map +1 -1
- package/esm/plots/stock/types.d.ts +20 -7
- package/esm/plots/stock/types.js.map +1 -1
- package/esm/plots/sunburst/types.d.ts +40 -12
- package/esm/plots/sunburst/types.js.map +1 -1
- package/esm/plots/tiny-area/types.d.ts +16 -5
- package/esm/plots/tiny-area/types.js.map +1 -1
- package/esm/plots/tiny-column/types.d.ts +10 -3
- package/esm/plots/tiny-column/types.js.map +1 -1
- package/esm/plots/tiny-line/types.d.ts +17 -5
- package/esm/plots/tiny-line/types.js.map +1 -1
- package/esm/plots/treemap/types.d.ts +17 -6
- package/esm/plots/treemap/types.js.map +1 -1
- package/esm/plots/venn/types.d.ts +20 -6
- package/esm/plots/venn/types.js.map +1 -1
- package/esm/plots/violin/types.d.ts +52 -17
- package/esm/plots/violin/types.js.map +1 -1
- package/esm/plots/waterfall/types.d.ts +42 -10
- package/esm/plots/waterfall/types.js.map +1 -1
- package/esm/plots/word-cloud/types.d.ts +91 -44
- package/esm/plots/word-cloud/types.js.map +1 -1
- package/esm/types/button.d.ts +8 -4
- package/esm/types/button.js.map +1 -1
- package/esm/types/common.d.ts +145 -33
- package/esm/types/common.js.map +1 -1
- package/esm/types/drill-down.d.ts +28 -7
- package/esm/types/drill-down.js.map +1 -1
- package/esm/types/interaction.d.ts +26 -6
- package/esm/types/interaction.js.map +1 -1
- package/esm/types/label.d.ts +11 -3
- package/esm/types/label.js.map +1 -1
- package/esm/types/meta.d.ts +4 -7
- package/esm/types/meta.js.map +1 -1
- package/esm/types/pattern.d.ts +58 -18
- package/esm/types/pattern.js.map +1 -1
- package/esm/types/state.d.ts +11 -3
- package/esm/types/state.js.map +1 -1
- package/esm/types/statistic.d.ts +38 -6
- package/esm/types/statistic.js.map +1 -1
- package/esm/types/tooltip.d.ts +7 -2
- package/esm/types/tooltip.js.map +1 -1
- package/lib/core/plot.d.ts +2 -2
- package/lib/core/plot.js +4 -3
- package/lib/core/plot.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/plots/area/types.d.ts +35 -10
- package/lib/plots/area/types.js.map +1 -1
- package/lib/plots/bar/types.d.ts +16 -3
- package/lib/plots/bar/types.js.map +1 -1
- package/lib/plots/bidirectional-bar/types.d.ts +21 -6
- package/lib/plots/bidirectional-bar/types.js.map +1 -1
- package/lib/plots/box/types.d.ts +20 -6
- package/lib/plots/box/types.js.map +1 -1
- package/lib/plots/bullet/types.d.ts +36 -9
- package/lib/plots/bullet/types.js.map +1 -1
- package/lib/plots/chord/types.d.ts +14 -10
- package/lib/plots/chord/types.js.map +1 -1
- package/lib/plots/circle-packing/types.d.ts +25 -8
- package/lib/plots/circle-packing/types.js.map +1 -1
- package/lib/plots/column/types.d.ts +57 -16
- package/lib/plots/column/types.js.map +1 -1
- package/lib/plots/dual-axes/types.d.ts +31 -6
- package/lib/plots/dual-axes/types.js.map +1 -1
- package/lib/plots/facet/types.d.ts +54 -34
- package/lib/plots/facet/types.js.map +1 -1
- package/lib/plots/funnel/geometries/compare.js +2 -1
- package/lib/plots/funnel/geometries/compare.js.map +1 -1
- package/lib/plots/funnel/geometries/facet.js +2 -1
- package/lib/plots/funnel/geometries/facet.js.map +1 -1
- package/lib/plots/funnel/types.d.ts +45 -11
- package/lib/plots/funnel/types.js.map +1 -1
- package/lib/plots/gauge/adaptor.js +30 -2
- package/lib/plots/gauge/adaptor.js.map +1 -1
- package/lib/plots/gauge/types.d.ts +84 -22
- package/lib/plots/gauge/types.js.map +1 -1
- package/lib/plots/heatmap/types.d.ts +47 -12
- package/lib/plots/heatmap/types.js.map +1 -1
- package/lib/plots/histogram/types.d.ts +17 -6
- package/lib/plots/histogram/types.js.map +1 -1
- package/lib/plots/line/types.d.ts +42 -12
- package/lib/plots/line/types.js.map +1 -1
- package/lib/plots/liquid/index.d.ts +1 -0
- package/lib/plots/liquid/index.js +2 -0
- package/lib/plots/liquid/index.js.map +1 -1
- package/lib/plots/liquid/shapes/liquid.d.ts +16 -1
- package/lib/plots/liquid/shapes/liquid.js +14 -7
- package/lib/plots/liquid/shapes/liquid.js.map +1 -1
- package/lib/plots/liquid/types.d.ts +56 -16
- package/lib/plots/liquid/types.js.map +1 -1
- package/lib/plots/mix/types.d.ts +31 -22
- package/lib/plots/mix/types.js.map +1 -1
- package/lib/plots/pie/types.d.ts +27 -10
- package/lib/plots/pie/types.js.map +1 -1
- package/lib/plots/progress/types.d.ts +13 -4
- package/lib/plots/progress/types.js.map +1 -1
- package/lib/plots/radar/types.d.ts +39 -12
- package/lib/plots/radar/types.js.map +1 -1
- package/lib/plots/radial-bar/types.d.ts +39 -12
- package/lib/plots/radial-bar/types.js.map +1 -1
- package/lib/plots/ring-progress/types.d.ts +18 -6
- package/lib/plots/ring-progress/types.js.map +1 -1
- package/lib/plots/rose/types.d.ts +32 -12
- package/lib/plots/rose/types.js.map +1 -1
- package/lib/plots/sankey/types.d.ts +51 -32
- package/lib/plots/sankey/types.js.map +1 -1
- package/lib/plots/scatter/types.d.ts +76 -22
- package/lib/plots/scatter/types.js.map +1 -1
- package/lib/plots/stock/types.d.ts +20 -7
- package/lib/plots/stock/types.js.map +1 -1
- package/lib/plots/sunburst/types.d.ts +40 -12
- package/lib/plots/sunburst/types.js.map +1 -1
- package/lib/plots/tiny-area/types.d.ts +16 -5
- package/lib/plots/tiny-area/types.js.map +1 -1
- package/lib/plots/tiny-column/types.d.ts +10 -3
- package/lib/plots/tiny-column/types.js.map +1 -1
- package/lib/plots/tiny-line/types.d.ts +17 -5
- package/lib/plots/tiny-line/types.js.map +1 -1
- package/lib/plots/treemap/types.d.ts +17 -6
- package/lib/plots/treemap/types.js.map +1 -1
- package/lib/plots/venn/types.d.ts +20 -6
- package/lib/plots/venn/types.js.map +1 -1
- package/lib/plots/violin/types.d.ts +52 -17
- package/lib/plots/violin/types.js.map +1 -1
- package/lib/plots/waterfall/types.d.ts +42 -10
- package/lib/plots/waterfall/types.js.map +1 -1
- package/lib/plots/word-cloud/types.d.ts +91 -44
- package/lib/plots/word-cloud/types.js.map +1 -1
- package/lib/types/button.d.ts +8 -4
- package/lib/types/button.js.map +1 -1
- package/lib/types/common.d.ts +145 -33
- package/lib/types/common.js.map +1 -1
- package/lib/types/drill-down.d.ts +28 -7
- package/lib/types/drill-down.js.map +1 -1
- package/lib/types/interaction.d.ts +26 -6
- package/lib/types/interaction.js.map +1 -1
- package/lib/types/label.d.ts +11 -3
- package/lib/types/label.js.map +1 -1
- package/lib/types/meta.d.ts +4 -7
- package/lib/types/meta.js.map +1 -1
- package/lib/types/pattern.d.ts +58 -18
- package/lib/types/pattern.js.map +1 -1
- package/lib/types/state.d.ts +11 -3
- package/lib/types/state.js.map +1 -1
- package/lib/types/statistic.d.ts +38 -6
- package/lib/types/statistic.js.map +1 -1
- package/lib/types/tooltip.d.ts +7 -2
- package/lib/types/tooltip.js.map +1 -1
- package/package.json +1 -1
- package/src/core/plot.ts +5 -4
- package/src/index.ts +2 -2
- package/src/plots/area/types.ts +35 -10
- package/src/plots/bar/types.ts +16 -3
- package/src/plots/bidirectional-bar/types.ts +21 -6
- package/src/plots/box/types.ts +20 -6
- package/src/plots/bullet/types.ts +36 -17
- package/src/plots/chord/types.ts +14 -11
- package/src/plots/circle-packing/types.ts +25 -14
- package/src/plots/column/types.ts +57 -20
- package/src/plots/dual-axes/types.ts +31 -16
- package/src/plots/facet/types.ts +54 -49
- package/src/plots/funnel/geometries/compare.ts +2 -0
- package/src/plots/funnel/geometries/facet.ts +2 -1
- package/src/plots/funnel/types.ts +45 -14
- package/src/plots/gauge/adaptor.ts +38 -2
- package/src/plots/gauge/types.ts +87 -28
- package/src/plots/heatmap/types.ts +49 -14
- package/src/plots/histogram/types.ts +17 -9
- package/src/plots/line/types.ts +42 -14
- package/src/plots/liquid/index.ts +2 -0
- package/src/plots/liquid/shapes/liquid.ts +16 -8
- package/src/plots/liquid/types.ts +56 -16
- package/src/plots/mix/types.ts +31 -35
- package/src/plots/pie/types.ts +27 -10
- package/src/plots/progress/types.ts +13 -4
- package/src/plots/radar/types.ts +39 -12
- package/src/plots/radial-bar/types.ts +39 -12
- package/src/plots/ring-progress/types.ts +18 -6
- package/src/plots/rose/types.ts +32 -12
- package/src/plots/sankey/types.ts +52 -32
- package/src/plots/scatter/types.ts +77 -24
- package/src/plots/stock/types.ts +21 -8
- package/src/plots/sunburst/types.ts +42 -12
- package/src/plots/tiny-area/types.ts +16 -5
- package/src/plots/tiny-column/types.ts +10 -3
- package/src/plots/tiny-line/types.ts +17 -5
- package/src/plots/treemap/types.ts +17 -7
- package/src/plots/venn/types.ts +21 -6
- package/src/plots/violin/types.ts +52 -17
- package/src/plots/waterfall/types.ts +42 -10
- package/src/plots/word-cloud/types.ts +91 -44
- package/src/types/button.ts +8 -4
- package/src/types/common.ts +145 -37
- package/src/types/drill-down.ts +28 -7
- package/src/types/interaction.ts +26 -6
- package/src/types/label.ts +11 -3
- package/src/types/meta.ts +4 -7
- package/src/types/pattern.ts +58 -18
- package/src/types/state.ts +11 -3
- package/src/types/statistic.ts +38 -6
- package/src/types/tooltip.ts +7 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liquid.js","sourceRoot":"","sources":["../../../../src/plots/liquid/shapes/liquid.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AAEzC,mCAAmD;AACnD,gDAAkD;AAIlD,IAAM,QAAQ,GAAG,IAAI,CAAC;AAEtB;;;;;GAKG;AACH,SAAS,IAAI,CAAC,GAAW,EAAE,GAAW,EAAE,MAAc;IACpD,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC;AACpC,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,GAAe;IACnC,IAAM,KAAK,sBAAK,OAAO,EAAE,CAAC,IAAK,GAAG,CAAC,KAAK,CAAE,CAAC;IAE3C,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAC5B,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC;KACxB;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,GAAe;IACnC,IAAM,YAAY,GAAG;QACnB,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,CAAC;QACd,SAAS,EAAE,CAAC;KACb,CAAC;IACF,IAAM,KAAK,GAAG,UAAG,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;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AAC;gBAChC,MAAM,EAAE,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU;aAC3D;SACF,CAAC,CAAC;QAEH,2BAA2B;QAC3B,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YACzB,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,UAAG,CAAC,YAAY,EAAE;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,aAAa;gBACnB,SAAS,EAAE,MAAM;aAClB,CAAC;SACH,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { registerShape } from '@antv/g2';\nimport { IGroup, IShape } from '@antv/g-base';\nimport { reduce, isNumber, mix } from '@antv/util';\nimport { transform } from '../../../utils/matrix';\nimport { Point, ShapeStyle } from '../../../types';\nimport { LiquidOptions, CustomInfo } from '../types';\n\nconst DURATION = 5000;\n\n/**\n * 一个线性映射的函数\n * @param min\n * @param max\n * @param factor\n */\nfunction lerp(min: number, max: number, factor: number) {\n return min + (max - min) * factor;\n}\n\n/**\n * 波浪的 attrs\n * @param cfg\n */\nfunction getFillAttrs(cfg: ShapeStyle) {\n const attrs = { opacity: 1, ...cfg.style };\n\n if (cfg.color && !attrs.fill) {\n attrs.fill = cfg.color;\n }\n\n return attrs;\n}\n\n/**\n * shape 的 attrs\n * @param cfg\n */\nfunction getLineAttrs(cfg: ShapeStyle) {\n const defaultAttrs = {\n fill: '#fff',\n fillOpacity: 0,\n lineWidth: 4,\n };\n const attrs = mix({}, defaultAttrs, cfg.style);\n\n if (cfg.color && !attrs.stroke) {\n attrs.stroke = cfg.color;\n }\n if (isNumber(cfg.opacity)) {\n attrs.opacity = attrs.strokeOpacity = cfg.opacity;\n }\n\n return attrs;\n}\n\n/**\n * 用贝塞尔曲线模拟正弦波\n * Using Bezier curves to fit sine wave.\n * There is 4 control points for each curve of wave,\n * which is at 1/4 wave length of the sine wave.\n *\n * The control points for a wave from (a) to (d) are a-b-c-d:\n * c *----* d\n * b *\n * |\n * ... a * ..................\n *\n * whose positions are a: (0, 0), b: (0.5, 0.5), c: (1, 1), d: (PI / 2, 1)\n *\n * @param x x position of the left-most point (a)\n * @param stage 0-3, stating which part of the wave it is\n * @param waveLength wave length of the sine wave\n * @param amplitude wave amplitude\n * @return 正弦片段曲线\n */\nfunction getWaterWavePositions(x: number, stage: number, waveLength: number, amplitude: number) {\n if (stage === 0) {\n return [\n [x + ((1 / 2) * waveLength) / Math.PI / 2, amplitude / 2],\n [x + ((1 / 2) * waveLength) / Math.PI, amplitude],\n [x + waveLength / 4, amplitude],\n ];\n }\n if (stage === 1) {\n return [\n [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 2), amplitude],\n [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 1), amplitude / 2],\n [x + waveLength / 4, 0],\n ];\n }\n if (stage === 2) {\n return [\n [x + ((1 / 2) * waveLength) / Math.PI / 2, -amplitude / 2],\n [x + ((1 / 2) * waveLength) / Math.PI, -amplitude],\n [x + waveLength / 4, -amplitude],\n ];\n }\n return [\n [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 2), -amplitude],\n [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 1), -amplitude / 2],\n [x + waveLength / 4, 0],\n ];\n}\n/**\n * 获取水波路径\n * @param radius 半径\n * @param waterLevel 水位\n * @param waveLength 波长\n * @param phase 相位\n * @param amplitude 震幅\n * @param cx 圆心x\n * @param cy 圆心y\n * @return path 路径\n * @reference http://gitlab.alipay-inc.com/datavis/g6/blob/1.2.0/src/graph/utils/path.js#L135\n */\nfunction getWaterWavePath(\n radius: number,\n waterLevel: number,\n waveLength: number,\n phase: number,\n amplitude: number,\n cx: number,\n cy: number\n) {\n const curves = Math.ceil(((2 * radius) / waveLength) * 4) * 4;\n const path = [];\n let _phase = phase;\n\n // map phase to [-Math.PI * 2, 0]\n while (_phase < -Math.PI * 2) {\n _phase += Math.PI * 2;\n }\n while (_phase > 0) {\n _phase -= Math.PI * 2;\n }\n _phase = (_phase / Math.PI / 2) * waveLength;\n\n const left = cx - radius + _phase - radius * 2;\n /**\n * top-left corner as start point\n *\n * draws this point\n * |\n * \\|/\n * ~~~~~~~~\n * | |\n * +------+\n */\n path.push(['M', left, waterLevel]);\n\n /**\n * top wave\n *\n * ~~~~~~~~ <- draws this sine wave\n * | |\n * +------+\n */\n let waveRight = 0;\n for (let c = 0; c < curves; ++c) {\n const stage = c % 4;\n const pos = getWaterWavePositions((c * waveLength) / 4, stage, waveLength, amplitude);\n path.push([\n 'C',\n pos[0][0] + left,\n -pos[0][1] + waterLevel,\n pos[1][0] + left,\n -pos[1][1] + waterLevel,\n pos[2][0] + left,\n -pos[2][1] + waterLevel,\n ]);\n\n if (c === curves - 1) {\n waveRight = pos[2][0];\n }\n }\n\n /**\n * top-right corner\n *\n * ~~~~~~~~\n * 3. draws this line -> | | <- 1. draws this line\n * +------+\n * ^\n * |\n * 2. draws this line\n */\n path.push(['L', waveRight + left, cy + radius]);\n path.push(['L', left, cy + radius]);\n path.push(['Z']);\n // path.push(['L', left, waterLevel]);\n return path;\n}\n\n/**\n * 添加水波\n * @param x 中心x\n * @param y 中心y\n * @param level 水位等级 0~1\n * @param waveCount 水波数\n * @param waveAttrs 色值\n * @param group 图组\n * @param clip 用于剪切的图形\n * @param radius 绘制图形的高度\n * @param waveLength 波的长度\n */\nfunction addWaterWave(\n x: number,\n y: number,\n level: number,\n waveCount: number,\n waveAttrs: ShapeStyle,\n group: IGroup,\n clip: IShape,\n radius: number,\n waveLength: number,\n animation: LiquidOptions['animation']\n) {\n const { fill, opacity } = waveAttrs;\n const bbox = clip.getBBox();\n const width = bbox.maxX - bbox.minX;\n const height = bbox.maxY - bbox.minY;\n\n for (let idx = 0; idx < waveCount; idx++) {\n const factor = waveCount <= 1 ? 0 : idx / (waveCount - 1);\n const wave = group.addShape('path', {\n name: `waterwave-path`,\n attrs: {\n path: getWaterWavePath(\n radius,\n bbox.minY + height * level,\n waveLength,\n 0,\n width / 32, // 波幅高度\n x,\n y\n ),\n fill,\n opacity: lerp(0.2, 0.9, factor) * opacity,\n },\n });\n\n try {\n if (animation === false) return;\n const matrix = transform([['t', waveLength, 0]]);\n\n wave.stopAnimate();\n wave.animate(\n { matrix },\n {\n duration: lerp(0.5 * DURATION, DURATION, factor),\n repeat: true,\n }\n );\n } catch (e) {\n // TODO off-screen canvas 中动画会找不到 canvas\n console.warn('off-screen group animate error!');\n }\n }\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction pin(x: number, y: number, width: number, height: number) {\n const w = (width * 2) / 3;\n const h = Math.max(w, height);\n const r = w / 2;\n\n // attrs of the upper circle\n const cx = x;\n const cy = r + y - h / 2;\n const theta = Math.asin(r / ((h - r) * 0.85));\n const dy = Math.sin(theta) * r;\n const dx = Math.cos(theta) * r;\n\n // the start point of the path\n const x0 = cx - dx;\n const y0 = cy + dy;\n\n // control point\n const cpX = x;\n const cpY = cy + r / Math.sin(theta);\n\n return `\n M ${x0} ${y0}\n A ${r} ${r} 0 1 1 ${x0 + dx * 2} ${y0}\n Q ${cpX} ${cpY} ${x} ${y + h / 2}\n Q ${cpX} ${cpY} ${x0} ${y0}\n Z \n `;\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction circle(x: number, y: number, width: number, height: number) {\n const rx = width / 2;\n const ry = height / 2;\n return `\n M ${x} ${y - ry} \n a ${rx} ${ry} 0 1 0 0 ${ry * 2}\n a ${rx} ${ry} 0 1 0 0 ${-ry * 2}\n Z\n `;\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction diamond(x: number, y: number, width: number, height: number) {\n const h = height / 2;\n const w = width / 2;\n return `\n M ${x} ${y - h}\n L ${x + w} ${y}\n L ${x} ${y + h}\n L ${x - w} ${y}\n Z\n `;\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction triangle(x: number, y: number, width: number, height: number) {\n const h = height / 2;\n const w = width / 2;\n return `\n M ${x} ${y - h}\n L ${x + w} ${y + h}\n L ${x - w} ${y + h}\n Z\n `;\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction rect(x: number, y: number, width: number, height: number) {\n const GOLDEN_SECTION_RATIO = 0.618;\n const h = height / 2;\n const w = (width / 2) * GOLDEN_SECTION_RATIO;\n return `\n M ${x - w} ${y - h}\n L ${x + w} ${y - h}\n L ${x + w} ${y + h}\n L ${x - w} ${y + h}\n Z\n `;\n}\n\nregisterShape('interval', 'liquid-fill-gauge', {\n draw(cfg: any, container: IGroup) {\n const cx = 0.5;\n const cy = 0.5;\n\n const { customInfo } = cfg;\n const { radius: radio, shape, background, animation } = customInfo as CustomInfo;\n const outline: LiquidOptions['outline'] = customInfo.outline;\n const wave: LiquidOptions['wave'] = customInfo.wave;\n const { border, distance } = outline;\n const { count: waveCount, length: waveLength } = wave;\n\n // 获取最小 minX\n const minX = reduce(\n cfg.points as Point[],\n (r: number, p: Point) => {\n return Math.min(r, p.x);\n },\n Infinity\n );\n\n const center = this.parsePoint({ x: cx, y: cy });\n const minXPoint = this.parsePoint({ x: minX, y: cy });\n const halfWidth = center.x - minXPoint.x;\n\n // 保证半径是 画布宽高最小值的 radius 值\n const radius = Math.min(halfWidth, minXPoint.y * radio);\n const waveAttrs = getFillAttrs(cfg);\n const outlineAttrs = getLineAttrs(mix({}, cfg, outline));\n const innerRadius = radius - border / 2;\n const builtInShapeByName = {\n pin,\n circle,\n diamond,\n triangle,\n rect,\n };\n const buildPath = typeof shape === 'function' ? shape : builtInShapeByName[shape] || builtInShapeByName['circle'];\n const shapePath = buildPath(center.x, center.y, innerRadius * 2, innerRadius * 2);\n\n // 1. 绘制一个波\n const waves = container.addGroup({\n name: 'waves',\n });\n\n // 3. 波对应的 clip 裁剪形状\n const clipPath = waves.setClip({\n type: 'path',\n attrs: {\n path: shapePath,\n },\n });\n\n // 4. 绘制波形\n addWaterWave(\n center.x,\n center.y,\n 1 - (cfg.points[1] as Point).y,\n waveCount,\n waveAttrs,\n waves,\n clipPath,\n radius * 2,\n waveLength,\n animation\n );\n\n // 2. 绘制一个 distance 宽的 border\n container.addShape('path', {\n name: 'distance',\n attrs: {\n path: shapePath,\n fill: 'transparent',\n lineWidth: border + distance * 2,\n stroke: background === 'transparent' ? '#fff' : background,\n },\n });\n\n // 3. 绘制一个 border 宽的 border\n container.addShape('path', {\n name: 'wrap',\n attrs: mix(outlineAttrs, {\n path: shapePath,\n fill: 'transparent',\n lineWidth: border,\n }),\n });\n\n return container;\n },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"liquid.js","sourceRoot":"","sources":["../../../../src/plots/liquid/shapes/liquid.ts"],"names":[],"mappings":";;;;AAAA,+BAAyC;AAEzC,mCAAmD;AACnD,gDAAkD;AAIlD,IAAM,QAAQ,GAAG,IAAI,CAAC;AAEtB;;;;;GAKG;AACH,SAAS,IAAI,CAAC,GAAW,EAAE,GAAW,EAAE,MAAc;IACpD,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC;AACpC,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,GAAe;IACnC,IAAM,KAAK,sBAAK,OAAO,EAAE,CAAC,IAAK,GAAG,CAAC,KAAK,CAAE,CAAC;IAE3C,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAC5B,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC;KACxB;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,GAAe;I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,EACT,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,CAAC,EACV,UAAU,EACV,SAAS,CACV,CAAC;QAEF,6BAA6B;QAC7B,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YACzB,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,aAAa;gBACnB,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,CAAC;gBAChC,MAAM,EAAE,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU;aAC3D;SACF,CAAC,CAAC;QAEH,2BAA2B;QAC3B,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YACzB,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,UAAG,CAAC,YAAY,EAAE;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,aAAa;gBACnB,SAAS,EAAE,MAAM;aAClB,CAAC;SACH,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { registerShape } from '@antv/g2';\nimport { IGroup, IShape } from '@antv/g-base';\nimport { reduce, isNumber, mix } from '@antv/util';\nimport { transform } from '../../../utils/matrix';\nimport { Point, ShapeStyle } from '../../../types';\nimport { LiquidOptions, CustomInfo } from '../types';\n\nconst DURATION = 5000;\n\n/**\n * 一个线性映射的函数\n * @param min\n * @param max\n * @param factor\n */\nfunction lerp(min: number, max: number, factor: number) {\n return min + (max - min) * factor;\n}\n\n/**\n * 波浪的 attrs\n * @param cfg\n */\nfunction getFillAttrs(cfg: ShapeStyle) {\n const attrs = { opacity: 1, ...cfg.style };\n\n if (cfg.color && !attrs.fill) {\n attrs.fill = cfg.color;\n }\n\n return attrs;\n}\n\n/**\n * shape 的 attrs\n * @param cfg\n */\nfunction getLineAttrs(cfg: ShapeStyle) {\n const defaultAttrs = {\n fill: '#fff',\n fillOpacity: 0,\n lineWidth: 4,\n };\n const attrs = mix({}, defaultAttrs, cfg.style);\n\n if (cfg.color && !attrs.stroke) {\n attrs.stroke = cfg.color;\n }\n if (isNumber(cfg.opacity)) {\n attrs.opacity = attrs.strokeOpacity = cfg.opacity;\n }\n\n return attrs;\n}\n\n/**\n * 用贝塞尔曲线模拟正弦波\n * Using Bezier curves to fit sine wave.\n * There is 4 control points for each curve of wave,\n * which is at 1/4 wave length of the sine wave.\n *\n * The control points for a wave from (a) to (d) are a-b-c-d:\n * c *----* d\n * b *\n * |\n * ... a * ..................\n *\n * whose positions are a: (0, 0), b: (0.5, 0.5), c: (1, 1), d: (PI / 2, 1)\n *\n * @param x x position of the left-most point (a)\n * @param stage 0-3, stating which part of the wave it is\n * @param waveLength wave length of the sine wave\n * @param amplitude wave amplitude\n * @return 正弦片段曲线\n */\nfunction getWaterWavePositions(x: number, stage: number, waveLength: number, amplitude: number) {\n if (stage === 0) {\n return [\n [x + ((1 / 2) * waveLength) / Math.PI / 2, amplitude / 2],\n [x + ((1 / 2) * waveLength) / Math.PI, amplitude],\n [x + waveLength / 4, amplitude],\n ];\n }\n if (stage === 1) {\n return [\n [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 2), amplitude],\n [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 1), amplitude / 2],\n [x + waveLength / 4, 0],\n ];\n }\n if (stage === 2) {\n return [\n [x + ((1 / 2) * waveLength) / Math.PI / 2, -amplitude / 2],\n [x + ((1 / 2) * waveLength) / Math.PI, -amplitude],\n [x + waveLength / 4, -amplitude],\n ];\n }\n return [\n [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 2), -amplitude],\n [x + (((1 / 2) * waveLength) / Math.PI / 2) * (Math.PI - 1), -amplitude / 2],\n [x + waveLength / 4, 0],\n ];\n}\n/**\n * 获取水波路径\n * @param radius 半径\n * @param waterLevel 水位\n * @param waveLength 波长\n * @param phase 相位\n * @param amplitude 震幅\n * @param cx 圆心x\n * @param cy 圆心y\n * @return path 路径\n * @reference http://gitlab.alipay-inc.com/datavis/g6/blob/1.2.0/src/graph/utils/path.js#L135\n */\nfunction getWaterWavePath(\n radius: number,\n waterLevel: number,\n waveLength: number,\n phase: number,\n amplitude: number,\n cx: number,\n cy: number\n) {\n const curves = Math.ceil(((2 * radius) / waveLength) * 4) * 4;\n const path = [];\n let _phase = phase;\n\n // map phase to [-Math.PI * 2, 0]\n while (_phase < -Math.PI * 2) {\n _phase += Math.PI * 2;\n }\n while (_phase > 0) {\n _phase -= Math.PI * 2;\n }\n _phase = (_phase / Math.PI / 2) * waveLength;\n\n const left = cx - radius + _phase - radius * 2;\n /**\n * top-left corner as start point\n *\n * draws this point\n * |\n * \\|/\n * ~~~~~~~~\n * | |\n * +------+\n */\n path.push(['M', left, waterLevel]);\n\n /**\n * top wave\n *\n * ~~~~~~~~ <- draws this sine wave\n * | |\n * +------+\n */\n let waveRight = 0;\n for (let c = 0; c < curves; ++c) {\n const stage = c % 4;\n const pos = getWaterWavePositions((c * waveLength) / 4, stage, waveLength, amplitude);\n path.push([\n 'C',\n pos[0][0] + left,\n -pos[0][1] + waterLevel,\n pos[1][0] + left,\n -pos[1][1] + waterLevel,\n pos[2][0] + left,\n -pos[2][1] + waterLevel,\n ]);\n\n if (c === curves - 1) {\n waveRight = pos[2][0];\n }\n }\n\n /**\n * top-right corner\n *\n * ~~~~~~~~\n * 3. draws this line -> | | <- 1. draws this line\n * +------+\n * ^\n * |\n * 2. draws this line\n */\n path.push(['L', waveRight + left, cy + radius]);\n path.push(['L', left, cy + radius]);\n path.push(['Z']);\n // path.push(['L', left, waterLevel]);\n return path;\n}\n\n/**\n * 添加水波\n * @param x 中心x\n * @param y 中心y\n * @param level 水位等级 0~1\n * @param waveCount 水波数\n * @param waveAttrs 色值\n * @param group 图组\n * @param clip 用于剪切的图形\n * @param radius 绘制图形的高度\n * @param waveLength 波的长度\n */\nexport function addWaterWave(\n x: number,\n y: number,\n level: number,\n waveCount: number,\n waveAttrs: ShapeStyle,\n group: IGroup,\n clip: IShape,\n radius: number,\n waveLength: number,\n animation: LiquidOptions['animation']\n) {\n // 盒子属性 颜色 宽高\n const { fill, opacity } = waveAttrs;\n const bbox = clip.getBBox();\n const width = bbox.maxX - bbox.minX;\n const height = bbox.maxY - bbox.minY;\n\n // 循环 waveCount 个数\n for (let idx = 0; idx < waveCount; idx++) {\n const factor = waveCount <= 1 ? 0 : idx / (waveCount - 1);\n\n // 画波\n const wave = group.addShape('path', {\n name: `waterwave-path`,\n attrs: {\n // 波形路径配置\n path: getWaterWavePath(\n radius,\n bbox.minY + height * level,\n waveLength,\n 0,\n width / 32, // 波幅高度\n x,\n y\n ),\n fill,\n opacity: lerp(0.2, 0.9, factor) * opacity,\n },\n });\n\n try {\n // 默认 underfind 开启动画\n if (animation === false) return;\n const matrix = transform([['t', waveLength, 0]]);\n\n wave.stopAnimate();\n wave.animate(\n { matrix },\n {\n duration: lerp(0.5 * DURATION, DURATION, factor),\n repeat: true,\n }\n );\n } catch (e) {\n // TODO off-screen canvas 中动画会找不到 canvas\n console.warn('off-screen group animate error!');\n }\n }\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction pin(x: number, y: number, width: number, height: number) {\n const w = (width * 2) / 3;\n const h = Math.max(w, height);\n const r = w / 2;\n\n // attrs of the upper circle\n const cx = x;\n const cy = r + y - h / 2;\n const theta = Math.asin(r / ((h - r) * 0.85));\n const dy = Math.sin(theta) * r;\n const dx = Math.cos(theta) * r;\n\n // the start point of the path\n const x0 = cx - dx;\n const y0 = cy + dy;\n\n // control point\n const cpX = x;\n const cpY = cy + r / Math.sin(theta);\n\n return `\n M ${x0} ${y0}\n A ${r} ${r} 0 1 1 ${x0 + dx * 2} ${y0}\n Q ${cpX} ${cpY} ${x} ${y + h / 2}\n Q ${cpX} ${cpY} ${x0} ${y0}\n Z \n `;\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction circle(x: number, y: number, width: number, height: number) {\n const rx = width / 2;\n const ry = height / 2;\n return `\n M ${x} ${y - ry} \n a ${rx} ${ry} 0 1 0 0 ${ry * 2}\n a ${rx} ${ry} 0 1 0 0 ${-ry * 2}\n Z\n `;\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction diamond(x: number, y: number, width: number, height: number) {\n const h = height / 2;\n const w = width / 2;\n return `\n M ${x} ${y - h}\n L ${x + w} ${y}\n L ${x} ${y + h}\n L ${x - w} ${y}\n Z\n `;\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction triangle(x: number, y: number, width: number, height: number) {\n const h = height / 2;\n const w = width / 2;\n return `\n M ${x} ${y - h}\n L ${x + w} ${y + h}\n L ${x - w} ${y + h}\n Z\n `;\n}\n\n/**\n *\n * @param x 中心 x\n * @param y 中心 y\n * @param width 外接矩形的宽\n * @param height 外接矩形的高\n */\nfunction rect(x: number, y: number, width: number, height: number) {\n const GOLDEN_SECTION_RATIO = 0.618;\n const h = height / 2;\n const w = (width / 2) * GOLDEN_SECTION_RATIO;\n return `\n M ${x - w} ${y - h}\n L ${x + w} ${y - h}\n L ${x + w} ${y + h}\n L ${x - w} ${y + h}\n Z\n `;\n}\n\nconst builtInShapeByName = {\n pin,\n circle,\n diamond,\n triangle,\n rect,\n};\n\nregisterShape('interval', 'liquid-fill-gauge', {\n draw(cfg: any, container: IGroup) {\n const cx = 0.5;\n const cy = 0.5;\n\n const { customInfo } = cfg;\n const { radius: radio, shape, background, animation } = customInfo as CustomInfo;\n const outline: LiquidOptions['outline'] = customInfo.outline;\n const wave: LiquidOptions['wave'] = customInfo.wave;\n const { border, distance } = outline;\n const { count: waveCount, length: waveLength } = wave;\n\n // 获取最小 minX\n const minX = reduce(\n cfg.points as Point[],\n (r: number, p: Point) => {\n return Math.min(r, p.x);\n },\n Infinity\n );\n\n const center = this.parsePoint({ x: cx, y: cy });\n const minXPoint = this.parsePoint({ x: minX, y: cy });\n const halfWidth = center.x - minXPoint.x;\n\n // 保证半径是 画布宽高最小值的 radius 值\n const radius = Math.min(halfWidth, minXPoint.y * radio);\n const waveAttrs = getFillAttrs(cfg);\n const outlineAttrs = getLineAttrs(mix({}, cfg, outline));\n const innerRadius = radius - border / 2;\n\n const buildPath = typeof shape === 'function' ? shape : builtInShapeByName[shape] || builtInShapeByName['circle'];\n const shapePath = buildPath(center.x, center.y, innerRadius * 2, innerRadius * 2);\n\n // 1. 绘制一个波\n const waves = container.addGroup({\n name: 'waves',\n });\n\n // 3. 波对应的 clip 裁剪形状\n const clipPath = waves.setClip({\n type: 'path',\n attrs: {\n path: shapePath,\n },\n });\n\n // 4. 绘制波形\n addWaterWave(\n center.x,\n center.y,\n 1 - (cfg.points[1] as Point).y,\n waveCount,\n waveAttrs,\n waves,\n clipPath,\n radius * 2,\n waveLength,\n animation\n );\n\n // 2. 绘制一个 distance 宽的 border\n container.addShape('path', {\n name: 'distance',\n attrs: {\n path: shapePath,\n fill: 'transparent',\n lineWidth: border + distance * 2,\n stroke: background === 'transparent' ? '#fff' : background,\n },\n });\n\n // 3. 绘制一个 border 宽的 border\n container.addShape('path', {\n name: 'wrap',\n attrs: mix(outlineAttrs, {\n path: shapePath,\n fill: 'transparent',\n lineWidth: border,\n }),\n });\n\n return container;\n },\n});\n"]}
|
|
@@ -1,41 +1,81 @@
|
|
|
1
1
|
import { PathCommand } from '@antv/g-base';
|
|
2
2
|
import { Options, StyleAttr, ColorAttr, Statistic, ShapeStyle } from '../../types';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @title 轮廓
|
|
5
|
+
*/
|
|
4
6
|
declare type Outline = Partial<{
|
|
5
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* @title 外环的宽度
|
|
9
|
+
* @default "2px"
|
|
10
|
+
*/
|
|
6
11
|
readonly border: number;
|
|
7
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @title 内外的边距
|
|
14
|
+
* @default "0px"
|
|
15
|
+
*/
|
|
8
16
|
readonly distance: number;
|
|
9
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @title 外环的样式
|
|
19
|
+
*/
|
|
10
20
|
readonly style?: Pick<ShapeStyle, 'stroke' | 'strokeOpacity'>;
|
|
11
21
|
}>;
|
|
12
22
|
declare type Wave = Partial<{
|
|
13
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* @title 波形的数量
|
|
25
|
+
* @default 3
|
|
26
|
+
*/
|
|
14
27
|
readonly count: number;
|
|
15
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* @title 波形的长度
|
|
30
|
+
* @default 192
|
|
31
|
+
*/
|
|
16
32
|
readonly length: number;
|
|
17
33
|
}>;
|
|
18
34
|
declare type ShapeCallback = (x: number, y: number, width: number, height: number) => PathCommand[];
|
|
19
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @title 配置类型定义
|
|
37
|
+
*/
|
|
20
38
|
export interface LiquidOptions extends Omit<Options, 'data'> {
|
|
21
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* @title 指标比例
|
|
41
|
+
*/
|
|
22
42
|
readonly percent: number;
|
|
23
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @title 配置水波图的颜色
|
|
45
|
+
* @description 使用默认色板的颜色
|
|
46
|
+
*/
|
|
24
47
|
readonly color?: ColorAttr;
|
|
25
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* @title 水波的外半径
|
|
50
|
+
* @description 范围0-1
|
|
51
|
+
* @default 0.9
|
|
52
|
+
*/
|
|
26
53
|
readonly radius?: number;
|
|
27
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* @title 水波图的样式
|
|
56
|
+
*/
|
|
28
57
|
readonly liquidStyle?: StyleAttr;
|
|
29
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* @title 指标文本组件
|
|
60
|
+
*/
|
|
30
61
|
readonly statistic?: Statistic;
|
|
31
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* @title 外环轮廓
|
|
64
|
+
*/
|
|
32
65
|
readonly outline?: Outline;
|
|
33
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* @title 波的配置
|
|
68
|
+
*/
|
|
34
69
|
readonly wave?: Wave;
|
|
35
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* @title 波的形状配置
|
|
72
|
+
* @description ('circle' | 'rect' | 'triangle' | 'diamond')
|
|
73
|
+
*/
|
|
36
74
|
readonly shape?: string | ShapeCallback;
|
|
37
75
|
}
|
|
38
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* @title 水波图自定义 的 customInfo
|
|
78
|
+
*/
|
|
39
79
|
export declare type CustomInfo = {
|
|
40
80
|
radius?: LiquidOptions['radius'];
|
|
41
81
|
outline?: LiquidOptions['outline'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/liquid/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PathCommand } from '@antv/g-base';\nimport { Options, StyleAttr, ColorAttr, Statistic, ShapeStyle } from '../../types';\n\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/liquid/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PathCommand } from '@antv/g-base';\nimport { Options, StyleAttr, ColorAttr, Statistic, ShapeStyle } from '../../types';\n\n/**\n * @title 轮廓\n */\ntype Outline = Partial<{\n /**\n * @title 外环的宽度\n * @default \"2px\"\n */\n readonly border: number;\n /**\n * @title 内外的边距\n * @default \"0px\"\n */\n readonly distance: number;\n /**\n * @title 外环的样式\n */\n readonly style?: Pick<ShapeStyle, 'stroke' | 'strokeOpacity'>;\n // /** 外边框的形状,可以有 circle,rect,默认为 circle */\n // readonly containerShape?: 'circle' | 'rect';\n}>;\n\ntype Wave = Partial<{\n /**\n * @title 波形的数量\n * @default 3\n */\n readonly count: number;\n /**\n * @title 波形的长度\n * @default 192\n */\n readonly length: number;\n}>;\n\ntype ShapeCallback = (x: number, y: number, width: number, height: number) => PathCommand[];\n\n/**\n * @title 配置类型定义\n */\nexport interface LiquidOptions extends Omit<Options, 'data'> {\n /**\n * @title 指标比例\n */\n readonly percent: number;\n /**\n * @title 配置水波图的颜色\n * @description 使用默认色板的颜色\n */\n readonly color?: ColorAttr;\n /**\n * @title 水波的外半径\n * @description 范围0-1\n * @default 0.9\n */\n readonly radius?: number;\n /**\n * @title 水波图的样式\n */\n readonly liquidStyle?: StyleAttr;\n /**\n * @title 指标文本组件\n */\n readonly statistic?: Statistic;\n /**\n * @title 外环轮廓\n */\n readonly outline?: Outline;\n /**\n * @title 波的配置\n */\n readonly wave?: Wave;\n /**\n * @title 波的形状配置\n * @description ('circle' | 'rect' | 'triangle' | 'diamond')\n */\n readonly shape?: string | ShapeCallback;\n}\n\n/**\n * @title 水波图自定义 的 customInfo\n */\nexport type CustomInfo = {\n radius?: LiquidOptions['radius'];\n outline?: LiquidOptions['outline'];\n wave?: LiquidOptions['wave'];\n shape?: LiquidOptions['shape'];\n background?: string;\n animation?: LiquidOptions['animation'];\n};\n"]}
|
package/lib/plots/mix/types.d.ts
CHANGED
|
@@ -8,87 +8,96 @@ import { Annotation } from '../../types/annotation';
|
|
|
8
8
|
import { Interaction } from '../../types/interaction';
|
|
9
9
|
import { IPlotTypes } from './utils';
|
|
10
10
|
/**
|
|
11
|
-
* geometry 映射信息
|
|
11
|
+
* @title geometry 映射信息
|
|
12
12
|
*/
|
|
13
13
|
export declare type IGeometry = Geometry & {
|
|
14
14
|
adjust?: Types.AdjustOption;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* 子 view
|
|
17
|
+
* @title 子 view 的配置
|
|
18
|
+
* @description 暂时不开嵌套 view 的情况
|
|
18
19
|
*/
|
|
19
20
|
export declare type IView = {
|
|
20
21
|
/**
|
|
21
|
-
* view
|
|
22
|
+
* @title view 的布局范围
|
|
23
|
+
* @default "占满全部"
|
|
22
24
|
*/
|
|
23
25
|
readonly region?: Region;
|
|
24
26
|
/**
|
|
25
|
-
* view 中的数据
|
|
27
|
+
* @title view 中的数据
|
|
26
28
|
*/
|
|
27
29
|
readonly data: Data;
|
|
28
30
|
/**
|
|
29
|
-
* view 中对应的 meta 字段配置
|
|
31
|
+
* @title view 中对应的 meta 字段配置
|
|
30
32
|
*/
|
|
31
33
|
readonly meta?: Record<string, Meta>;
|
|
32
34
|
/**
|
|
33
|
-
*
|
|
35
|
+
* @title 坐标系的配置
|
|
36
|
+
* @description 每一个 view 具有相同的坐标系
|
|
34
37
|
*/
|
|
35
38
|
readonly coordinate?: Types.CoordinateOption;
|
|
36
39
|
/**
|
|
37
|
-
* 图形 geometry 及映射配置
|
|
40
|
+
* @title 图形 geometry 及映射配置
|
|
38
41
|
*/
|
|
39
42
|
readonly geometries: IGeometry[];
|
|
40
43
|
/**
|
|
41
|
-
* x,y
|
|
44
|
+
* @title x,y 轴
|
|
42
45
|
*/
|
|
43
46
|
readonly axes?: false | Record<string, Axis>;
|
|
44
47
|
/**
|
|
45
|
-
* interactions
|
|
48
|
+
* @title interactions
|
|
46
49
|
*/
|
|
47
50
|
readonly interactions?: Interaction[];
|
|
48
51
|
/**
|
|
49
|
-
* annotation
|
|
52
|
+
* @title annotation
|
|
50
53
|
*/
|
|
51
54
|
readonly annotations?: Annotation[];
|
|
52
55
|
/**
|
|
53
|
-
*
|
|
56
|
+
* @title annotation
|
|
54
57
|
*/
|
|
55
58
|
readonly animation?: Animation;
|
|
56
59
|
/**
|
|
57
|
-
* tooltip
|
|
60
|
+
* @title tooltip
|
|
58
61
|
*/
|
|
59
62
|
readonly tooltip?: Tooltip;
|
|
60
63
|
};
|
|
61
64
|
/**
|
|
62
|
-
* 子 plot 的配置
|
|
65
|
+
* @title 子 plot 的配置
|
|
63
66
|
*/
|
|
64
67
|
export declare type IPlot = IPlotTypes & {
|
|
65
68
|
/**
|
|
66
|
-
* plot view
|
|
69
|
+
* @title plot view 的布局范围
|
|
70
|
+
* @default "占满全部"
|
|
67
71
|
*/
|
|
68
72
|
readonly region?: Region;
|
|
69
73
|
};
|
|
70
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* @title 类型定义
|
|
76
|
+
*/
|
|
71
77
|
export interface MixOptions extends Omit<Options, 'data' | 'legend' | 'xAxis' | 'yAxis' | 'legend' | 'tooltip' | 'slider' | 'scrollbar'> {
|
|
72
78
|
/**
|
|
73
|
-
* 是否同步子 view 的配置
|
|
74
|
-
* 目前仅仅支持 true / false,后续需要增加 function 的方式进行自定义 view 之前的布局同步
|
|
79
|
+
* @title 是否同步子 view 的配置
|
|
80
|
+
* @description 目前仅仅支持 true / false,后续需要增加 function 的方式进行自定义 view 之前的布局同步
|
|
75
81
|
*/
|
|
76
82
|
readonly syncViewPadding?: boolean;
|
|
77
83
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
84
|
+
* @title 每一个图层的配置
|
|
85
|
+
* @description 每个图层包括有自己的:数据、图形、图形映射
|
|
80
86
|
*/
|
|
81
87
|
readonly views?: IView[];
|
|
82
88
|
/**
|
|
83
|
-
*
|
|
89
|
+
* @title 限定与指定 plot 类型
|
|
90
|
+
* @description 支持使用已有的 plot,限定与指定 plot 类型
|
|
84
91
|
*/
|
|
85
92
|
readonly plots?: IPlot[];
|
|
86
93
|
/**
|
|
87
|
-
* tooltip
|
|
94
|
+
* @title tooltip 配置
|
|
95
|
+
* @description tooltip 配置在 chart 层配置
|
|
88
96
|
*/
|
|
89
97
|
readonly tooltip?: Tooltip;
|
|
90
98
|
/**
|
|
91
|
-
* legend
|
|
99
|
+
* @title legend 配置
|
|
100
|
+
* @description 统一顶层配置
|
|
92
101
|
*/
|
|
93
102
|
readonly legend?: false | Record<string, Legend>;
|
|
94
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/mix/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Types } from '@antv/g2';\nimport { Data, Meta, Options, Region, Tooltip } from '../../types';\nimport { Axis } from '../../types/axis';\nimport { Legend } from '../../types/legend';\nimport { Geometry } from '../../adaptor/geometries/base';\nimport { Animation } from '../../types/animation';\nimport { Annotation } from '../../types/annotation';\nimport { Interaction } from '../../types/interaction';\nimport { IPlotTypes } from './utils';\n\n/**\n * geometry 映射信息\n */\nexport type IGeometry = Geometry & {\n adjust?: Types.AdjustOption;\n};\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/mix/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Types } from '@antv/g2';\nimport { Data, Meta, Options, Region, Tooltip } from '../../types';\nimport { Axis } from '../../types/axis';\nimport { Legend } from '../../types/legend';\nimport { Geometry } from '../../adaptor/geometries/base';\nimport { Animation } from '../../types/animation';\nimport { Annotation } from '../../types/annotation';\nimport { Interaction } from '../../types/interaction';\nimport { IPlotTypes } from './utils';\n\n/**\n * @title geometry 映射信息\n */\nexport type IGeometry = Geometry & {\n adjust?: Types.AdjustOption;\n};\n/**\n * @title 子 view 的配置\n * @description 暂时不开嵌套 view 的情况\n */\nexport type IView = {\n /**\n * @title view 的布局范围\n * @default \"占满全部\"\n */\n readonly region?: Region;\n /**\n * @title view 中的数据\n */\n readonly data: Data;\n /**\n * @title view 中对应的 meta 字段配置\n */\n readonly meta?: Record<string, Meta>;\n /**\n * @title 坐标系的配置\n * @description 每一个 view 具有相同的坐标系\n */\n readonly coordinate?: Types.CoordinateOption;\n /**\n * @title 图形 geometry 及映射配置\n */\n readonly geometries: IGeometry[];\n /**\n * @title x,y 轴\n */\n readonly axes?: false | Record<string, Axis>;\n /**\n * @title interactions\n */\n readonly interactions?: Interaction[];\n /**\n * @title annotation\n */\n readonly annotations?: Annotation[];\n /**\n * @title annotation\n */\n readonly animation?: Animation;\n /**\n * @title tooltip\n */\n readonly tooltip?: Tooltip;\n};\n\n/**\n * @title 子 plot 的配置\n */\nexport type IPlot = IPlotTypes & {\n /**\n * @title plot view 的布局范围\n * @default \"占满全部\"\n */\n readonly region?: Region;\n};\n\n/**\n * @title 类型定义\n */\nexport interface MixOptions\n extends Omit<Options, 'data' | 'legend' | 'xAxis' | 'yAxis' | 'legend' | 'tooltip' | 'slider' | 'scrollbar'> {\n /**\n * @title 是否同步子 view 的配置\n * @description 目前仅仅支持 true / false,后续需要增加 function 的方式进行自定义 view 之前的布局同步\n */\n readonly syncViewPadding?: boolean;\n /**\n * @title 每一个图层的配置\n * @description 每个图层包括有自己的:数据、图形、图形映射\n */\n readonly views?: IView[];\n /**\n * @title 限定与指定 plot 类型\n * @description 支持使用已有的 plot,限定与指定 plot 类型\n */\n readonly plots?: IPlot[];\n /**\n * @title tooltip 配置\n * @description tooltip 配置在 chart 层配置\n */\n readonly tooltip?: Tooltip;\n /**\n * @title legend 配置\n * @description 统一顶层配置\n */\n readonly legend?: false | Record<string, Legend>;\n}\n"]}
|
package/lib/plots/pie/types.d.ts
CHANGED
|
@@ -5,25 +5,42 @@ export declare type StatisticData = {
|
|
|
5
5
|
value: string | number | null;
|
|
6
6
|
};
|
|
7
7
|
export interface PieOptions extends Options {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title 角度映射字段
|
|
10
|
+
*/
|
|
9
11
|
readonly angleField: string;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @title 颜色映射字段
|
|
14
|
+
*/
|
|
11
15
|
readonly colorField: string;
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @title 饼图半径
|
|
18
|
+
*/
|
|
13
19
|
readonly radius?: number;
|
|
14
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* @title 饼图内半径
|
|
22
|
+
*/
|
|
15
23
|
readonly innerRadius?: number;
|
|
16
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* @title 饼图标签
|
|
26
|
+
* @description type: 'inner' | 'outer' | 'spider'
|
|
27
|
+
*/
|
|
17
28
|
readonly label?: Label;
|
|
18
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* @title 饼图图形样式
|
|
31
|
+
*/
|
|
19
32
|
readonly pieStyle?: StyleAttr;
|
|
20
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* @title 圆环的开始角度
|
|
35
|
+
*/
|
|
21
36
|
readonly startAngle?: number;
|
|
22
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* @title 圆环的结束角度
|
|
39
|
+
*/
|
|
23
40
|
readonly endAngle?: number;
|
|
24
41
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
42
|
+
* @title 指标卡组件
|
|
43
|
+
* @description 显示在环图中心,可以代替tooltip,显示环图数据的总计值和各项数据,启用 statistic 组件的同时将自动关闭tooltip
|
|
27
44
|
*/
|
|
28
45
|
readonly statistic?: Statistic;
|
|
29
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/pie/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, Statistic, StyleAttr } from '../../types';\nimport { Label } from '../../types/label';\n\nexport type StatisticData = {\n title: string;\n value: string | number | null;\n};\n\nexport interface PieOptions extends Options {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/pie/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, Statistic, StyleAttr } from '../../types';\nimport { Label } from '../../types/label';\n\nexport type StatisticData = {\n title: string;\n value: string | number | null;\n};\n\nexport interface PieOptions extends Options {\n /**\n * @title 角度映射字段\n */\n readonly angleField: string;\n /**\n * @title 颜色映射字段\n */\n readonly colorField: string;\n /**\n * @title 饼图半径\n */\n readonly radius?: number;\n /**\n * @title 饼图内半径\n */\n readonly innerRadius?: number;\n /**\n * @title 饼图标签\n * @description type: 'inner' | 'outer' | 'spider'\n */\n readonly label?: Label;\n /**\n * @title 饼图图形样式\n */\n readonly pieStyle?: StyleAttr;\n // 设置扇形图\n /**\n * @title 圆环的开始角度\n */\n readonly startAngle?: number;\n /**\n * @title 圆环的结束角度\n */\n readonly endAngle?: number;\n /**\n * @title 指标卡组件\n * @description 显示在环图中心,可以代替tooltip,显示环图数据的总计值和各项数据,启用 statistic 组件的同时将自动关闭tooltip\n */\n readonly statistic?: Statistic;\n}\n"]}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { Options, StyleAttr, ColorAttr } from '../../types';
|
|
2
2
|
/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */
|
|
3
3
|
export interface ProgressOptions extends Omit<Options, 'data' | 'color'> {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* @title 进度百分比
|
|
6
|
+
*/
|
|
5
7
|
readonly percent: number;
|
|
6
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title 条图宽度占比
|
|
10
|
+
* @description 范围[0-1]
|
|
11
|
+
*/
|
|
7
12
|
readonly barWidthRatio?: number;
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* @title 进度条颜色
|
|
15
|
+
*/
|
|
9
16
|
readonly color?: ColorAttr;
|
|
10
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @title 进度条样式
|
|
19
|
+
*/
|
|
11
20
|
readonly progressStyle?: StyleAttr;
|
|
12
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/progress/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, StyleAttr, ColorAttr } from '../../types';\n\n/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */\nexport interface ProgressOptions extends Omit<Options, 'data' | 'color'> {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/progress/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Options, StyleAttr, ColorAttr } from '../../types';\n\n/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */\nexport interface ProgressOptions extends Omit<Options, 'data' | 'color'> {\n /**\n * @title 进度百分比\n */\n readonly percent: number;\n /**\n * @title 条图宽度占比\n * @description 范围[0-1]\n */\n readonly barWidthRatio?: number;\n /**\n * @title 进度条颜色\n */\n readonly color?: ColorAttr;\n /**\n * @title 进度条样式\n */\n readonly progressStyle?: StyleAttr;\n}\n"]}
|
|
@@ -1,28 +1,55 @@
|
|
|
1
1
|
import { PointGeometryOptions, AreaGeometryOptions } from '../../adaptor/geometries';
|
|
2
2
|
import { Options, ShapeStyle } from '../../types';
|
|
3
3
|
export interface RadarOptions extends Options {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* @title x轴字段
|
|
6
|
+
*/
|
|
5
7
|
readonly xField: string;
|
|
6
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @title y轴字段
|
|
10
|
+
* @description 映射雷达图的射线长度
|
|
11
|
+
*/
|
|
7
12
|
readonly yField: string;
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* @title 分组字段
|
|
15
|
+
*/
|
|
9
16
|
readonly seriesField?: string;
|
|
10
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* @title 是否平滑
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
11
21
|
readonly smooth?: boolean;
|
|
12
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* @title 折线图形样式
|
|
24
|
+
*/
|
|
13
25
|
readonly lineStyle?: ShapeStyle | ((x: any, y: any, series?: any) => ShapeStyle);
|
|
14
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* @title 数据点图形样式
|
|
28
|
+
*/
|
|
15
29
|
readonly point?: PointGeometryOptions['point'] & Pick<PointGeometryOptions, 'state'>;
|
|
16
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* @title area 图形样式
|
|
32
|
+
* @description 均提供回调的方式, 不开放 field 映射配置
|
|
33
|
+
*/
|
|
17
34
|
readonly area?: AreaGeometryOptions['area'];
|
|
18
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @title 角度轴配置
|
|
37
|
+
*/
|
|
19
38
|
readonly xAxis?: any;
|
|
20
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* @title 径向轴配置
|
|
41
|
+
*/
|
|
21
42
|
readonly yAxis?: any;
|
|
22
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @title 雷达图半径
|
|
45
|
+
*/
|
|
23
46
|
readonly radius?: number;
|
|
24
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* @title 雷达图开始角度
|
|
49
|
+
*/
|
|
25
50
|
readonly startAngle?: number;
|
|
26
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* @title 雷达图结束角度
|
|
53
|
+
*/
|
|
27
54
|
readonly endAngle?: number;
|
|
28
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/radar/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PointGeometryOptions, AreaGeometryOptions } from '../../adaptor/geometries';\nimport { Options, ShapeStyle } from '../../types';\n\nexport interface RadarOptions extends Options {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/radar/types.ts"],"names":[],"mappings":"","sourcesContent":["import { PointGeometryOptions, AreaGeometryOptions } from '../../adaptor/geometries';\nimport { Options, ShapeStyle } from '../../types';\n\nexport interface RadarOptions extends Options {\n /**\n * @title x轴字段\n */\n readonly xField: string;\n /**\n * @title y轴字段\n * @description 映射雷达图的射线长度\n */\n readonly yField: string;\n /**\n * @title 分组字段\n */\n readonly seriesField?: string;\n /**\n * @title 是否平滑\n * @default false\n */\n readonly smooth?: boolean;\n /**\n * @title 折线图形样式\n */\n readonly lineStyle?: ShapeStyle | ((x: any, y: any, series?: any) => ShapeStyle);\n /**\n * @title 数据点图形样式\n */\n readonly point?: PointGeometryOptions['point'] & Pick<PointGeometryOptions, 'state'>;\n /**\n * @title area 图形样式\n * @description 均提供回调的方式, 不开放 field 映射配置\n */\n readonly area?: AreaGeometryOptions['area'];\n /**\n * @title 角度轴配置\n */\n readonly xAxis?: any;\n /**\n * @title 径向轴配置\n */\n readonly yAxis?: any;\n /**\n * @title 雷达图半径\n */\n readonly radius?: number;\n /**\n * @title 雷达图开始角度\n */\n readonly startAngle?: number;\n /**\n * @title 雷达图结束角度\n */\n readonly endAngle?: number;\n}\n"]}
|
|
@@ -3,28 +3,55 @@ import { Options } from '../../types';
|
|
|
3
3
|
import { BarOptions } from '../bar';
|
|
4
4
|
/** 配置类型定义 */
|
|
5
5
|
export interface RadialBarOptions extends Options, Pick<BarOptions, 'barBackground' | 'minBarWidth' | 'maxBarWidth'> {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @title x轴字段
|
|
8
|
+
*/
|
|
7
9
|
readonly xField?: string;
|
|
8
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* @title y轴字段
|
|
12
|
+
*/
|
|
9
13
|
readonly yField?: string;
|
|
10
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* @title 样式
|
|
16
|
+
*/
|
|
11
17
|
readonly barStyle?: ShapeAttrs;
|
|
12
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* @title 最大旋转角度
|
|
20
|
+
* @description 范围0-360
|
|
21
|
+
*/
|
|
13
22
|
readonly maxAngle?: number;
|
|
14
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* @title 圆半径
|
|
25
|
+
*/
|
|
15
26
|
readonly radius?: number;
|
|
16
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* @title 圆内半径
|
|
29
|
+
*/
|
|
17
30
|
readonly innerRadius?: number;
|
|
18
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* @title 圆环的开始角度
|
|
33
|
+
*/
|
|
19
34
|
readonly startAngle?: number;
|
|
20
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @title 圆环的结束角度
|
|
37
|
+
*/
|
|
21
38
|
readonly endAngle?: number;
|
|
22
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* @title 颜色字段
|
|
41
|
+
*/
|
|
23
42
|
readonly colorField?: string;
|
|
24
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @title 类型
|
|
45
|
+
*/
|
|
25
46
|
readonly type?: string;
|
|
26
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* @title 是否叠加
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
27
51
|
readonly isStack?: boolean;
|
|
28
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* @title 是否分组
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
29
56
|
readonly isGroup?: boolean;
|
|
30
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/radial-bar/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ShapeAttrs } from '@antv/g-base';\nimport { Options } from '../../types';\nimport { BarOptions } from '../bar';\n\n/** 配置类型定义 */\nexport interface RadialBarOptions extends Options, Pick<BarOptions, 'barBackground' | 'minBarWidth' | 'maxBarWidth'> {\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plots/radial-bar/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ShapeAttrs } from '@antv/g-base';\nimport { Options } from '../../types';\nimport { BarOptions } from '../bar';\n\n/** 配置类型定义 */\nexport interface RadialBarOptions extends Options, Pick<BarOptions, 'barBackground' | 'minBarWidth' | 'maxBarWidth'> {\n /**\n * @title x轴字段\n */\n readonly xField?: string;\n /**\n * @title y轴字段\n */\n readonly yField?: string;\n /**\n * @title 样式\n */\n readonly barStyle?: ShapeAttrs;\n /**\n * @title 最大旋转角度\n * @description 范围0-360\n */\n readonly maxAngle?: number;\n /**\n * @title 圆半径\n */\n readonly radius?: number;\n /**\n * @title 圆内半径\n */\n readonly innerRadius?: number;\n /**\n * @title 圆环的开始角度\n */\n readonly startAngle?: number;\n /**\n * @title 圆环的结束角度\n */\n readonly endAngle?: number;\n /**\n * @title 颜色字段\n */\n readonly colorField?: string;\n /**\n * @title 类型\n */\n readonly type?: string;\n /**\n * @title 是否叠加\n * @default false\n */\n readonly isStack?: boolean;\n /**\n * @title 是否分组\n * @default false\n */\n readonly isGroup?: boolean;\n}\n"]}
|