@visactor/vchart-extension 2.1.0-alpha.15 → 2.1.0-alpha.16
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/build/index.js +297 -41
- package/build/index.min.js +2 -2
- package/cjs/charts/axis-3d/index.js +2 -1
- package/cjs/charts/axis-3d/linear-axis.js +1 -2
- package/cjs/charts/bar-3d/chart-spec-transformer.js +1 -1
- package/cjs/charts/bar-3d/chart.js +1 -1
- package/cjs/charts/bar-3d/constant.js +1 -1
- package/cjs/charts/bar-3d/index.js +1 -1
- package/cjs/charts/bar-3d/interface.js +1 -1
- package/cjs/charts/bar-3d/series-spec-transformer.js +1 -1
- package/cjs/charts/bar-3d/series.js +1 -1
- package/cjs/charts/bar-3d/theme.js +1 -1
- package/cjs/charts/candlestick/candlestick-transformer.js +1 -1
- package/cjs/charts/candlestick/candlestick.js +1 -2
- package/cjs/charts/candlestick/index.js +1 -1
- package/cjs/charts/candlestick/interface.js +1 -1
- package/cjs/charts/candlestick/util.js +1 -1
- package/cjs/charts/combination-candlestick/combination-candlestick-transformer.js +1 -1
- package/cjs/charts/combination-candlestick/combination-candlestick.js +1 -1
- package/cjs/charts/combination-candlestick/constant.js +1 -1
- package/cjs/charts/combination-candlestick/index.js +1 -1
- package/cjs/charts/combination-candlestick/interface.js +1 -1
- package/cjs/charts/conversion-funnel/arrow-data-transform.js +1 -1
- package/cjs/charts/conversion-funnel/constants.js +1 -1
- package/cjs/charts/conversion-funnel/conversion-funnel-transformer.js +1 -1
- package/cjs/charts/conversion-funnel/conversion-funnel.js +1 -1
- package/cjs/charts/conversion-funnel/index.js +1 -1
- package/cjs/charts/conversion-funnel/interface.js +1 -1
- package/cjs/charts/conversion-funnel/util.js +1 -1
- package/cjs/charts/histogram-3d/chart.js +1 -2
- package/cjs/charts/histogram-3d/index.js +1 -1
- package/cjs/charts/histogram-3d/interface.js +1 -1
- package/cjs/charts/image-cloud/image-cloud-transformer.js +1 -1
- package/cjs/charts/image-cloud/image-cloud.js +1 -1
- package/cjs/charts/image-cloud/index.js +1 -1
- package/cjs/charts/image-cloud/interface.js +1 -1
- package/cjs/charts/pictogram/element-highlight-by-graphic-name.js +1 -1
- package/cjs/charts/storyline/interface.d.ts +3 -1
- package/cjs/charts/storyline/interface.js.map +1 -1
- package/cjs/charts/storyline/layout.js +6 -7
- package/cjs/charts/storyline/layout.js.map +1 -1
- package/cjs/charts/storyline/layouts/bowl.js +17 -18
- package/cjs/charts/storyline/layouts/bowl.js.map +1 -1
- package/cjs/charts/storyline/layouts/clock.js +15 -1
- package/cjs/charts/storyline/layouts/clock.js.map +1 -1
- package/cjs/charts/storyline/layouts/common.d.ts +1 -0
- package/cjs/charts/storyline/layouts/common.js +5 -1
- package/cjs/charts/storyline/layouts/common.js.map +1 -1
- package/cjs/charts/storyline/layouts/dome.js +17 -3
- package/cjs/charts/storyline/layouts/dome.js.map +1 -1
- package/cjs/charts/storyline/layouts/wing.d.ts +4 -0
- package/cjs/charts/storyline/layouts/wing.js +215 -0
- package/cjs/charts/storyline/layouts/wing.js.map +1 -0
- package/cjs/charts/storyline/storyline-transformer.js +14 -10
- package/cjs/charts/storyline/storyline-transformer.js.map +1 -1
- package/cjs/components/bar-link/bar-link.js +1 -1
- package/cjs/components/bar-link/constant.js +1 -1
- package/cjs/components/bar-link/index.js +1 -1
- package/cjs/components/bar-link/type.js +1 -1
- package/cjs/components/bar-link/util.js +1 -1
- package/cjs/components/bar-regression-line/index.js +1 -1
- package/cjs/components/bar-regression-line/type.js +1 -1
- package/cjs/components/extension-mark-sync-state/extension-mark-sync-state.js +1 -1
- package/cjs/components/extension-mark-sync-state/index.js +1 -1
- package/cjs/components/extension-mark-sync-state/type.js +1 -1
- package/cjs/components/histogram-regression-line/index.js +1 -1
- package/cjs/components/histogram-regression-line/type.js +2 -1
- package/cjs/components/map-label/index.js +1 -1
- package/cjs/components/map-label/layout.js +1 -1
- package/cjs/components/map-label/map-label-transformer.js +1 -1
- package/cjs/components/map-label/map-label.js +1 -1
- package/cjs/components/map-label/theme.js +1 -1
- package/cjs/components/map-label/type.js +1 -1
- package/cjs/components/regression-line/index.js +1 -1
- package/cjs/components/regression-line/regression-line.js +1 -1
- package/cjs/components/regression-line/type.js +1 -1
- package/cjs/components/scatter-regression-line/index.js +1 -1
- package/cjs/components/scatter-regression-line/type.js +1 -1
- package/cjs/components/series-break/constant.js +1 -1
- package/cjs/components/series-break/index.js +1 -1
- package/cjs/components/series-break/series-break.js +1 -1
- package/cjs/components/series-break/type.js +1 -1
- package/cjs/components/series-break/util.js +2 -1
- package/cjs/components/series-label/constant.js +1 -1
- package/cjs/components/series-label/index.js +1 -1
- package/cjs/components/series-label/series-label.js +1 -1
- package/cjs/components/series-label/type.js +1 -1
- package/cjs/components/series-label/util.js +1 -1
- package/esm/charts/axis-3d/index.js +2 -1
- package/esm/charts/axis-3d/linear-axis.js +1 -2
- package/esm/charts/bar-3d/chart-spec-transformer.js +1 -1
- package/esm/charts/bar-3d/chart.js +1 -1
- package/esm/charts/bar-3d/constant.js +1 -1
- package/esm/charts/bar-3d/index.js +1 -1
- package/esm/charts/bar-3d/interface.js +1 -1
- package/esm/charts/bar-3d/series-spec-transformer.js +1 -1
- package/esm/charts/bar-3d/series.js +1 -1
- package/esm/charts/bar-3d/theme.js +1 -1
- package/esm/charts/candlestick/candlestick-transformer.js +1 -1
- package/esm/charts/candlestick/candlestick.js +1 -2
- package/esm/charts/candlestick/index.js +1 -1
- package/esm/charts/candlestick/interface.js +1 -1
- package/esm/charts/candlestick/util.js +1 -1
- package/esm/charts/combination-candlestick/combination-candlestick-transformer.js +1 -1
- package/esm/charts/combination-candlestick/combination-candlestick.js +1 -1
- package/esm/charts/combination-candlestick/constant.js +1 -1
- package/esm/charts/combination-candlestick/index.js +1 -1
- package/esm/charts/combination-candlestick/interface.js +1 -1
- package/esm/charts/conversion-funnel/arrow-data-transform.js +1 -1
- package/esm/charts/conversion-funnel/constants.js +1 -1
- package/esm/charts/conversion-funnel/conversion-funnel-transformer.js +1 -1
- package/esm/charts/conversion-funnel/conversion-funnel.js +1 -1
- package/esm/charts/conversion-funnel/index.js +1 -1
- package/esm/charts/conversion-funnel/interface.js +1 -1
- package/esm/charts/conversion-funnel/util.js +1 -1
- package/esm/charts/histogram-3d/chart.js +1 -2
- package/esm/charts/histogram-3d/index.js +1 -1
- package/esm/charts/histogram-3d/interface.js +1 -1
- package/esm/charts/image-cloud/image-cloud-transformer.js +1 -1
- package/esm/charts/image-cloud/image-cloud.js +1 -1
- package/esm/charts/image-cloud/index.js +1 -1
- package/esm/charts/image-cloud/interface.js +1 -1
- package/esm/charts/pictogram/element-highlight-by-graphic-name.js +1 -1
- package/esm/charts/storyline/interface.d.ts +3 -1
- package/esm/charts/storyline/interface.js.map +1 -1
- package/esm/charts/storyline/layout.js +6 -7
- package/esm/charts/storyline/layout.js.map +1 -1
- package/esm/charts/storyline/layouts/bowl.js +17 -18
- package/esm/charts/storyline/layouts/bowl.js.map +1 -1
- package/esm/charts/storyline/layouts/clock.js +15 -1
- package/esm/charts/storyline/layouts/clock.js.map +1 -1
- package/esm/charts/storyline/layouts/common.d.ts +1 -0
- package/esm/charts/storyline/layouts/common.js +2 -0
- package/esm/charts/storyline/layouts/common.js.map +1 -1
- package/esm/charts/storyline/layouts/dome.js +17 -3
- package/esm/charts/storyline/layouts/dome.js.map +1 -1
- package/esm/charts/storyline/layouts/wing.d.ts +4 -0
- package/esm/charts/storyline/layouts/wing.js +210 -0
- package/esm/charts/storyline/layouts/wing.js.map +1 -0
- package/esm/charts/storyline/storyline-transformer.js +15 -10
- package/esm/charts/storyline/storyline-transformer.js.map +1 -1
- package/esm/components/bar-link/bar-link.js +1 -1
- package/esm/components/bar-link/constant.js +1 -1
- package/esm/components/bar-link/index.js +1 -1
- package/esm/components/bar-link/type.js +1 -1
- package/esm/components/bar-link/util.js +1 -1
- package/esm/components/bar-regression-line/index.js +1 -1
- package/esm/components/bar-regression-line/type.js +1 -1
- package/esm/components/extension-mark-sync-state/extension-mark-sync-state.js +1 -1
- package/esm/components/extension-mark-sync-state/index.js +1 -1
- package/esm/components/extension-mark-sync-state/type.js +1 -1
- package/esm/components/histogram-regression-line/index.js +1 -1
- package/esm/components/histogram-regression-line/type.js +2 -1
- package/esm/components/map-label/index.js +1 -1
- package/esm/components/map-label/layout.js +1 -1
- package/esm/components/map-label/map-label-transformer.js +1 -1
- package/esm/components/map-label/map-label.js +1 -1
- package/esm/components/map-label/theme.js +1 -1
- package/esm/components/map-label/type.js +1 -1
- package/esm/components/regression-line/index.js +1 -1
- package/esm/components/regression-line/regression-line.js +1 -1
- package/esm/components/regression-line/type.js +1 -1
- package/esm/components/scatter-regression-line/index.js +1 -1
- package/esm/components/scatter-regression-line/type.js +1 -1
- package/esm/components/series-break/constant.js +1 -1
- package/esm/components/series-break/index.js +1 -1
- package/esm/components/series-break/series-break.js +1 -1
- package/esm/components/series-break/type.js +1 -1
- package/esm/components/series-break/util.js +2 -1
- package/esm/components/series-label/constant.js +1 -1
- package/esm/components/series-label/index.js +1 -1
- package/esm/components/series-label/series-label.js +1 -1
- package/esm/components/series-label/type.js +1 -1
- package/esm/components/series-label/util.js +1 -1
- package/package.json +4 -4
package/build/index.js
CHANGED
|
@@ -5901,12 +5901,12 @@
|
|
|
5901
5901
|
case 'dome':
|
|
5902
5902
|
centers = arcCenters(count, inner, block, layout, 160, 20);
|
|
5903
5903
|
break;
|
|
5904
|
-
case '
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
centers = arcCenters(count, inner, block, layout, -70, 70);
|
|
5904
|
+
case 'wing': {
|
|
5905
|
+
const direction = layout.direction === 'right' ? 'right' : 'left';
|
|
5906
|
+
const [s, e] = direction === 'right' ? [110, 250] : [-70, 70];
|
|
5907
|
+
centers = arcCenters(count, inner, block, layout, s, e);
|
|
5909
5908
|
break;
|
|
5909
|
+
}
|
|
5910
5910
|
case 'landscape':
|
|
5911
5911
|
default:
|
|
5912
5912
|
centers = lineCenters(count, inner.x + block.width / 2, center.y, inner.x + inner.width - block.width / 2, center.y);
|
|
@@ -6068,6 +6068,7 @@
|
|
|
6068
6068
|
const isClock = (spec) => normalizeLayout(spec.layout).type === 'clock';
|
|
6069
6069
|
const isDome = (spec) => normalizeLayout(spec.layout).type === 'dome';
|
|
6070
6070
|
const isBowl = (spec) => normalizeLayout(spec.layout).type === 'bowl';
|
|
6071
|
+
const isWing = (spec) => normalizeLayout(spec.layout).type === 'wing';
|
|
6071
6072
|
const getThemeColor = (spec) => { var _a; return (_a = spec.themeColor) !== null && _a !== void 0 ? _a : DEFAULT_THEME_COLOR; };
|
|
6072
6073
|
const withAlpha = (color, alpha) => {
|
|
6073
6074
|
const safeAlpha = Math.max(0, Math.min(1, alpha));
|
|
@@ -6344,7 +6345,24 @@
|
|
|
6344
6345
|
}, y: (_d, ctx) => {
|
|
6345
6346
|
const g = getClockGeometry(spec, ctx);
|
|
6346
6347
|
return g.cy - g.R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO;
|
|
6347
|
-
}, width: (_d, ctx) => getClockGeometry(spec, ctx).R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO * 2, height: (_d, ctx) => getClockGeometry(spec, ctx).R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO * 2, image: (_c = spec.centerImage) === null || _c === void 0 ? void 0 : _c.image, cornerRadius: (_d, ctx) => getClockGeometry(spec, ctx).R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO, repeatX: 'no-repeat', repeatY: 'no-repeat', imageMode: 'cover', imagePosition: 'center'
|
|
6348
|
+
}, width: (_d, ctx) => getClockGeometry(spec, ctx).R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO * 2, height: (_d, ctx) => getClockGeometry(spec, ctx).R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO * 2, image: (_c = spec.centerImage) === null || _c === void 0 ? void 0 : _c.image, cornerRadius: (_d, ctx) => getClockGeometry(spec, ctx).R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO, repeatX: 'no-repeat', repeatY: 'no-repeat', imageMode: 'cover', imagePosition: 'center', anchor: (_d, ctx) => {
|
|
6349
|
+
const g = getClockGeometry(spec, ctx);
|
|
6350
|
+
return [g.cx, g.cy];
|
|
6351
|
+
}, dx: (_d, ctx) => {
|
|
6352
|
+
var _a, _b;
|
|
6353
|
+
const g = getClockGeometry(spec, ctx);
|
|
6354
|
+
const rectW = g.R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO * 2;
|
|
6355
|
+
const userWidth = (_b = (_a = spec.centerImage) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.width;
|
|
6356
|
+
const w = typeof userWidth === 'number' ? userWidth : rectW;
|
|
6357
|
+
return (rectW - w) / 2;
|
|
6358
|
+
}, dy: (_d, ctx) => {
|
|
6359
|
+
var _a, _b;
|
|
6360
|
+
const g = getClockGeometry(spec, ctx);
|
|
6361
|
+
const rectH = g.R * CLOCK_CENTER_RADIUS_RATIO * CLOCK_CENTER_IMAGE_INSET_RATIO * 2;
|
|
6362
|
+
const userHeight = (_b = (_a = spec.centerImage) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.height;
|
|
6363
|
+
const h = typeof userHeight === 'number' ? userHeight : rectH;
|
|
6364
|
+
return (rectH - h) / 2;
|
|
6365
|
+
} }, (_e = spec.centerImage) === null || _e === void 0 ? void 0 : _e.style)
|
|
6348
6366
|
}
|
|
6349
6367
|
: {
|
|
6350
6368
|
type: 'symbol',
|
|
@@ -7092,8 +7110,7 @@
|
|
|
7092
7110
|
const DOME_TEXT_BOX_HEIGHT = 300;
|
|
7093
7111
|
const DOME_TITLE_TO_CONTENT_GAP = 4;
|
|
7094
7112
|
const DOME_TEXT_LEFT_PADDING = 20;
|
|
7095
|
-
const
|
|
7096
|
-
const DOME_CENTER_IMAGE_HEIGHT_RATIO = 0.32;
|
|
7113
|
+
const DOME_CENTER_IMAGE_SIZE_RATIO = 0.4;
|
|
7097
7114
|
const DOME_ARC_TOP_GAP_FROM_CENTER_IMAGE = 300;
|
|
7098
7115
|
const getDomeCenterImageRect = (spec, ctx) => {
|
|
7099
7116
|
var _a, _b, _c, _e, _f;
|
|
@@ -7101,8 +7118,9 @@
|
|
|
7101
7118
|
const padding = normalizePadding((_a = spec.block) === null || _a === void 0 ? void 0 : _a.padding);
|
|
7102
7119
|
const innerWidth = Math.max(width - padding.left - padding.right, 1);
|
|
7103
7120
|
const innerHeight = Math.max(height - padding.top - padding.bottom, 1);
|
|
7104
|
-
const
|
|
7105
|
-
const
|
|
7121
|
+
const baseSize = Math.min(innerWidth, innerHeight) * DOME_CENTER_IMAGE_SIZE_RATIO;
|
|
7122
|
+
const w = Math.max((_c = (_b = spec.centerImage) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : baseSize, 80);
|
|
7123
|
+
const h = Math.max((_f = (_e = spec.centerImage) === null || _e === void 0 ? void 0 : _e.height) !== null && _f !== void 0 ? _f : baseSize, 80);
|
|
7106
7124
|
const cx = startX + padding.left + innerWidth / 2;
|
|
7107
7125
|
const top = startY + padding.top + innerHeight - h;
|
|
7108
7126
|
return { x: cx - w / 2, y: top, width: w, height: h };
|
|
@@ -7259,7 +7277,22 @@
|
|
|
7259
7277
|
}
|
|
7260
7278
|
},
|
|
7261
7279
|
hasImage
|
|
7262
|
-
? Object.assign(Object.assign({ type: 'image', name: 'storyline-dome-center-image', interactive: false }, spec.centerImage), { style: Object.assign({ x: (_d, ctx) => getDomeCenterImageRect(spec, ctx).x, y: (_d, ctx) => getDomeCenterImageRect(spec, ctx).y, width: (_d, ctx) => getDomeCenterImageRect(spec, ctx).width, height: (_d, ctx) => getDomeCenterImageRect(spec, ctx).height, image: (_c = spec.centerImage) === null || _c === void 0 ? void 0 : _c.image, cornerRadius: 12, repeatX: 'no-repeat', repeatY: 'no-repeat', imageMode: 'cover', imagePosition: 'center'
|
|
7280
|
+
? Object.assign(Object.assign({ type: 'image', name: 'storyline-dome-center-image', interactive: false }, spec.centerImage), { style: Object.assign({ x: (_d, ctx) => getDomeCenterImageRect(spec, ctx).x, y: (_d, ctx) => getDomeCenterImageRect(spec, ctx).y, width: (_d, ctx) => getDomeCenterImageRect(spec, ctx).width, height: (_d, ctx) => getDomeCenterImageRect(spec, ctx).height, image: (_c = spec.centerImage) === null || _c === void 0 ? void 0 : _c.image, cornerRadius: 12, repeatX: 'no-repeat', repeatY: 'no-repeat', imageMode: 'cover', imagePosition: 'center', anchor: (_d, ctx) => {
|
|
7281
|
+
const r = getDomeCenterImageRect(spec, ctx);
|
|
7282
|
+
return [r.x + r.width / 2, r.y + r.height / 2];
|
|
7283
|
+
}, dx: (_d, ctx) => {
|
|
7284
|
+
var _a, _b;
|
|
7285
|
+
const r = getDomeCenterImageRect(spec, ctx);
|
|
7286
|
+
const userWidth = (_b = (_a = spec.centerImage) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.width;
|
|
7287
|
+
const w = typeof userWidth === 'number' ? userWidth : r.width;
|
|
7288
|
+
return (r.width - w) / 2;
|
|
7289
|
+
}, dy: (_d, ctx) => {
|
|
7290
|
+
var _a, _b;
|
|
7291
|
+
const r = getDomeCenterImageRect(spec, ctx);
|
|
7292
|
+
const userHeight = (_b = (_a = spec.centerImage) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.height;
|
|
7293
|
+
const h = typeof userHeight === 'number' ? userHeight : r.height;
|
|
7294
|
+
return (r.height - h) / 2;
|
|
7295
|
+
} }, (_e = spec.centerImage) === null || _e === void 0 ? void 0 : _e.style) })
|
|
7263
7296
|
: null
|
|
7264
7297
|
].filter(Boolean)
|
|
7265
7298
|
};
|
|
@@ -7367,8 +7400,7 @@
|
|
|
7367
7400
|
const BOWL_TEXT_BOX_HEIGHT = 300;
|
|
7368
7401
|
const BOWL_TITLE_TO_CONTENT_GAP = 4;
|
|
7369
7402
|
const BOWL_TEXT_LEFT_PADDING = 20;
|
|
7370
|
-
const
|
|
7371
|
-
const BOWL_CENTER_IMAGE_HEIGHT_RATIO = 0.32;
|
|
7403
|
+
const BOWL_CENTER_IMAGE_SIZE_RATIO = 0.4;
|
|
7372
7404
|
const BOWL_ARC_BOTTOM_GAP_FROM_CENTER_IMAGE = 300;
|
|
7373
7405
|
const getBowlCenterImageRect = (spec, ctx) => {
|
|
7374
7406
|
var _a, _b, _c, _e, _f;
|
|
@@ -7376,8 +7408,9 @@
|
|
|
7376
7408
|
const padding = normalizePadding((_a = spec.block) === null || _a === void 0 ? void 0 : _a.padding);
|
|
7377
7409
|
const innerWidth = Math.max(width - padding.left - padding.right, 1);
|
|
7378
7410
|
const innerHeight = Math.max(height - padding.top - padding.bottom, 1);
|
|
7379
|
-
const
|
|
7380
|
-
const
|
|
7411
|
+
const baseSize = Math.min(innerWidth, innerHeight) * BOWL_CENTER_IMAGE_SIZE_RATIO;
|
|
7412
|
+
const w = Math.max((_c = (_b = spec.centerImage) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : baseSize, 80);
|
|
7413
|
+
const h = Math.max((_f = (_e = spec.centerImage) === null || _e === void 0 ? void 0 : _e.height) !== null && _f !== void 0 ? _f : baseSize, 80);
|
|
7381
7414
|
const cx = startX + padding.left + innerWidth / 2;
|
|
7382
7415
|
const top = startY + padding.top;
|
|
7383
7416
|
return { x: cx - w / 2, y: top, width: w, height: h };
|
|
@@ -7518,23 +7551,23 @@
|
|
|
7518
7551
|
lineWidth: 2
|
|
7519
7552
|
}
|
|
7520
7553
|
},
|
|
7521
|
-
{
|
|
7522
|
-
type: 'rect',
|
|
7523
|
-
name: 'storyline-bowl-center-rect',
|
|
7524
|
-
interactive: false,
|
|
7525
|
-
style: {
|
|
7526
|
-
x: (_d, ctx) => getBowlCenterImageRect(spec, ctx).x,
|
|
7527
|
-
y: (_d, ctx) => getBowlCenterImageRect(spec, ctx).y,
|
|
7528
|
-
width: (_d, ctx) => getBowlCenterImageRect(spec, ctx).width,
|
|
7529
|
-
height: (_d, ctx) => getBowlCenterImageRect(spec, ctx).height,
|
|
7530
|
-
cornerRadius: 12,
|
|
7531
|
-
fill: '#ffffff',
|
|
7532
|
-
stroke: themeColor,
|
|
7533
|
-
lineWidth: 2
|
|
7534
|
-
}
|
|
7535
|
-
},
|
|
7536
7554
|
hasImage
|
|
7537
|
-
? Object.assign(Object.assign({ type: 'image', name: 'storyline-bowl-center-image', interactive: false }, spec.centerImage), { style: Object.assign({ x: (_d, ctx) => getBowlCenterImageRect(spec, ctx).x, y: (_d, ctx) => getBowlCenterImageRect(spec, ctx).y, width: (_d, ctx) => getBowlCenterImageRect(spec, ctx).width, height: (_d, ctx) => getBowlCenterImageRect(spec, ctx).height, image: (_c = spec.centerImage) === null || _c === void 0 ? void 0 : _c.image, cornerRadius: 12, repeatX: 'no-repeat', repeatY: 'no-repeat',
|
|
7555
|
+
? Object.assign(Object.assign({ type: 'image', name: 'storyline-bowl-center-image', interactive: false }, spec.centerImage), { style: Object.assign({ x: (_d, ctx) => getBowlCenterImageRect(spec, ctx).x, y: (_d, ctx) => getBowlCenterImageRect(spec, ctx).y, width: (_d, ctx) => getBowlCenterImageRect(spec, ctx).width, height: (_d, ctx) => getBowlCenterImageRect(spec, ctx).height, image: (_c = spec.centerImage) === null || _c === void 0 ? void 0 : _c.image, cornerRadius: 12, repeatX: 'no-repeat', repeatY: 'no-repeat', imagePosition: 'center', anchor: (_d, ctx) => {
|
|
7556
|
+
const r = getBowlCenterImageRect(spec, ctx);
|
|
7557
|
+
return [r.x + r.width / 2, r.y + r.height / 2];
|
|
7558
|
+
}, dx: (_d, ctx) => {
|
|
7559
|
+
var _a, _b;
|
|
7560
|
+
const r = getBowlCenterImageRect(spec, ctx);
|
|
7561
|
+
const userWidth = (_b = (_a = spec.centerImage) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.width;
|
|
7562
|
+
const w = typeof userWidth === 'number' ? userWidth : r.width;
|
|
7563
|
+
return (r.width - w) / 2;
|
|
7564
|
+
}, dy: (_d, ctx) => {
|
|
7565
|
+
var _a, _b;
|
|
7566
|
+
const r = getBowlCenterImageRect(spec, ctx);
|
|
7567
|
+
const userHeight = (_b = (_a = spec.centerImage) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.height;
|
|
7568
|
+
const h = typeof userHeight === 'number' ? userHeight : r.height;
|
|
7569
|
+
return (r.height - h) / 2;
|
|
7570
|
+
} }, (_e = spec.centerImage) === null || _e === void 0 ? void 0 : _e.style) })
|
|
7538
7571
|
: null
|
|
7539
7572
|
].filter(Boolean)
|
|
7540
7573
|
};
|
|
@@ -7634,6 +7667,219 @@
|
|
|
7634
7667
|
};
|
|
7635
7668
|
};
|
|
7636
7669
|
|
|
7670
|
+
const WING_BLOCK_IMAGE_SIZE = 96;
|
|
7671
|
+
const WING_TEXT_GAP_FROM_IMAGE = 14;
|
|
7672
|
+
const WING_TITLE_LINE_HEIGHT = 26;
|
|
7673
|
+
const WING_TITLE_FONT_SIZE = 20;
|
|
7674
|
+
const WING_CONTENT_LINE_HEIGHT = 17;
|
|
7675
|
+
const WING_CONTENT_FONT_SIZE = 12;
|
|
7676
|
+
const WING_TEXT_BOX_WIDTH = 240;
|
|
7677
|
+
const WING_TEXT_BOX_HEIGHT = 110;
|
|
7678
|
+
const WING_TITLE_TO_CONTENT_GAP = 4;
|
|
7679
|
+
const getWingDirection = (spec) => {
|
|
7680
|
+
var _a;
|
|
7681
|
+
return (_a = normalizeLayout(spec.layout).direction) !== null && _a !== void 0 ? _a : 'left';
|
|
7682
|
+
};
|
|
7683
|
+
const getWingArcGeometry = (spec, ctx) => {
|
|
7684
|
+
var _a, _b, _c, _e;
|
|
7685
|
+
const { width, height, startX, startY } = getRegionGeometry(ctx);
|
|
7686
|
+
const padding = normalizePadding((_a = spec.block) === null || _a === void 0 ? void 0 : _a.padding);
|
|
7687
|
+
const innerWidth = Math.max(width - padding.left - padding.right, 1);
|
|
7688
|
+
const innerHeight = Math.max(height - padding.top - padding.bottom, 1);
|
|
7689
|
+
const layoutOpt = normalizeLayout(spec.layout);
|
|
7690
|
+
const direction = getWingDirection(spec);
|
|
7691
|
+
const defaultStart = direction === 'right' ? 110 : -70;
|
|
7692
|
+
const defaultEnd = direction === 'right' ? 250 : 70;
|
|
7693
|
+
const startAngle = (_b = layoutOpt.startAngle) !== null && _b !== void 0 ? _b : defaultStart;
|
|
7694
|
+
const endAngle = (_c = layoutOpt.endAngle) !== null && _c !== void 0 ? _c : defaultEnd;
|
|
7695
|
+
const ratio = (_e = layoutOpt.radiusRatio) !== null && _e !== void 0 ? _e : 0.92;
|
|
7696
|
+
const ry = (innerHeight / 2) * ratio;
|
|
7697
|
+
const rx = innerWidth * 0.6 * ratio;
|
|
7698
|
+
const cx = direction === 'right' ? startX + padding.left + innerWidth - rx * 0.1 : startX + padding.left + rx * 0.1;
|
|
7699
|
+
const cy = startY + padding.top + innerHeight / 2;
|
|
7700
|
+
return { cx, cy, rx, ry, startAngle, endAngle };
|
|
7701
|
+
};
|
|
7702
|
+
const getWingBlockCenter = (spec, ctx, index) => {
|
|
7703
|
+
var _a, _b;
|
|
7704
|
+
const arc = getWingArcGeometry(spec, ctx);
|
|
7705
|
+
const count = (_b = (_a = spec.data) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
7706
|
+
if (count <= 0) {
|
|
7707
|
+
return { x: arc.cx, y: arc.cy };
|
|
7708
|
+
}
|
|
7709
|
+
const t = count === 1 ? 0.5 : index / (count - 1);
|
|
7710
|
+
const angle = ((arc.startAngle + (arc.endAngle - arc.startAngle) * t) / 180) * Math.PI;
|
|
7711
|
+
return {
|
|
7712
|
+
x: arc.cx + Math.cos(angle) * arc.rx,
|
|
7713
|
+
y: arc.cy + Math.sin(angle) * arc.ry
|
|
7714
|
+
};
|
|
7715
|
+
};
|
|
7716
|
+
const isTextOnLeft = (spec, index) => {
|
|
7717
|
+
const direction = getWingDirection(spec);
|
|
7718
|
+
return direction === 'right' ? index % 2 === 1 : index % 2 === 0;
|
|
7719
|
+
};
|
|
7720
|
+
const buildWingArcMark = (spec) => {
|
|
7721
|
+
var _a, _b, _c, _e, _f, _g, _h, _j;
|
|
7722
|
+
if (((_a = spec.line) === null || _a === void 0 ? void 0 : _a.visible) === false) {
|
|
7723
|
+
return null;
|
|
7724
|
+
}
|
|
7725
|
+
const themeColor = getThemeColor(spec);
|
|
7726
|
+
const lineStyle = ((_c = (_b = spec.line) === null || _b === void 0 ? void 0 : _b.style) !== null && _c !== void 0 ? _c : {});
|
|
7727
|
+
const startWidth = Math.max(Number((_e = lineStyle.startWidth) !== null && _e !== void 0 ? _e : 2), 0.5);
|
|
7728
|
+
const endWidth = Math.max(Number((_g = (_f = lineStyle.endWidth) !== null && _f !== void 0 ? _f : lineStyle.lineWidth) !== null && _g !== void 0 ? _g : 18), startWidth);
|
|
7729
|
+
return {
|
|
7730
|
+
type: 'group',
|
|
7731
|
+
name: 'storyline-wing-arc',
|
|
7732
|
+
zIndex: vchart.LayoutZIndex.Mark,
|
|
7733
|
+
children: [
|
|
7734
|
+
{
|
|
7735
|
+
type: 'path',
|
|
7736
|
+
name: 'storyline-wing-arc-path',
|
|
7737
|
+
interactive: false,
|
|
7738
|
+
style: {
|
|
7739
|
+
stroke: false,
|
|
7740
|
+
lineWidth: 0,
|
|
7741
|
+
fill: (_j = (_h = lineStyle.fill) !== null && _h !== void 0 ? _h : lineStyle.stroke) !== null && _j !== void 0 ? _j : themeColor,
|
|
7742
|
+
opacity: 0.95,
|
|
7743
|
+
path: (_d, ctx) => {
|
|
7744
|
+
const arc = getWingArcGeometry(spec, ctx);
|
|
7745
|
+
const span = arc.endAngle - arc.startAngle;
|
|
7746
|
+
const samples = 96;
|
|
7747
|
+
const pts = [];
|
|
7748
|
+
for (let i = 0; i <= samples; i++) {
|
|
7749
|
+
const t = i / samples;
|
|
7750
|
+
const angle = ((arc.startAngle + span * t) / 180) * Math.PI;
|
|
7751
|
+
const cx = arc.cx + Math.cos(angle) * arc.rx;
|
|
7752
|
+
const cy = arc.cy + Math.sin(angle) * arc.ry;
|
|
7753
|
+
const nxRaw = Math.cos(angle) / arc.rx;
|
|
7754
|
+
const nyRaw = Math.sin(angle) / arc.ry;
|
|
7755
|
+
const nLen = Math.hypot(nxRaw, nyRaw) || 1;
|
|
7756
|
+
pts.push({
|
|
7757
|
+
x: cx,
|
|
7758
|
+
y: cy,
|
|
7759
|
+
nx: nxRaw / nLen,
|
|
7760
|
+
ny: nyRaw / nLen,
|
|
7761
|
+
w: startWidth + (endWidth - startWidth) * t
|
|
7762
|
+
});
|
|
7763
|
+
}
|
|
7764
|
+
const segments = [];
|
|
7765
|
+
for (let i = 0; i < pts.length; i++) {
|
|
7766
|
+
const p = pts[i];
|
|
7767
|
+
const x = p.x + p.nx * (p.w / 2);
|
|
7768
|
+
const y = p.y + p.ny * (p.w / 2);
|
|
7769
|
+
segments.push(`${i === 0 ? 'M' : 'L'} ${x.toFixed(2)} ${y.toFixed(2)}`);
|
|
7770
|
+
}
|
|
7771
|
+
for (let i = pts.length - 1; i >= 0; i--) {
|
|
7772
|
+
const p = pts[i];
|
|
7773
|
+
const x = p.x - p.nx * (p.w / 2);
|
|
7774
|
+
const y = p.y - p.ny * (p.w / 2);
|
|
7775
|
+
segments.push(`L ${x.toFixed(2)} ${y.toFixed(2)}`);
|
|
7776
|
+
}
|
|
7777
|
+
segments.push('Z');
|
|
7778
|
+
return segments.join(' ');
|
|
7779
|
+
}
|
|
7780
|
+
}
|
|
7781
|
+
}
|
|
7782
|
+
]
|
|
7783
|
+
};
|
|
7784
|
+
};
|
|
7785
|
+
const getWingBlockMetrics = (spec, index) => {
|
|
7786
|
+
var _a, _b, _c, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
7787
|
+
const titleFontSize = Number((_c = (_b = (_a = spec.title) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fontSize) !== null && _c !== void 0 ? _c : WING_TITLE_FONT_SIZE);
|
|
7788
|
+
const titleLineHeight = Number((_g = (_f = (_e = spec.title) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.lineHeight) !== null && _g !== void 0 ? _g : Math.max(WING_TITLE_LINE_HEIGHT, Math.round(titleFontSize * 1.3)));
|
|
7789
|
+
const contentFontSize = Number((_k = (_j = (_h = spec.content) === null || _h === void 0 ? void 0 : _h.style) === null || _j === void 0 ? void 0 : _j.fontSize) !== null && _k !== void 0 ? _k : WING_CONTENT_FONT_SIZE);
|
|
7790
|
+
const contentLineHeight = Number((_o = (_m = (_l = spec.content) === null || _l === void 0 ? void 0 : _l.style) === null || _m === void 0 ? void 0 : _m.lineHeight) !== null && _o !== void 0 ? _o : WING_CONTENT_LINE_HEIGHT);
|
|
7791
|
+
const titleToContentGap = WING_TITLE_TO_CONTENT_GAP;
|
|
7792
|
+
const textHeight = WING_TEXT_BOX_HEIGHT;
|
|
7793
|
+
const contentHeight = Math.max(textHeight - titleLineHeight - titleToContentGap, contentLineHeight);
|
|
7794
|
+
const imageWidth = (_q = (_p = spec.image) === null || _p === void 0 ? void 0 : _p.width) !== null && _q !== void 0 ? _q : WING_BLOCK_IMAGE_SIZE;
|
|
7795
|
+
const imageHeight = (_s = (_r = spec.image) === null || _r === void 0 ? void 0 : _r.height) !== null && _s !== void 0 ? _s : WING_BLOCK_IMAGE_SIZE;
|
|
7796
|
+
const imageBox = {
|
|
7797
|
+
x: -imageWidth / 2,
|
|
7798
|
+
y: -imageHeight / 2,
|
|
7799
|
+
width: imageWidth,
|
|
7800
|
+
height: imageHeight
|
|
7801
|
+
};
|
|
7802
|
+
const onLeft = isTextOnLeft(spec, index);
|
|
7803
|
+
const textWidth = WING_TEXT_BOX_WIDTH;
|
|
7804
|
+
const textX = onLeft
|
|
7805
|
+
? -imageWidth / 2 - WING_TEXT_GAP_FROM_IMAGE - textWidth
|
|
7806
|
+
: imageWidth / 2 + WING_TEXT_GAP_FROM_IMAGE;
|
|
7807
|
+
const textY = -textHeight / 2;
|
|
7808
|
+
const textBox = { x: textX, y: textY, width: textWidth, height: textHeight };
|
|
7809
|
+
const contentBox = {
|
|
7810
|
+
x: textX,
|
|
7811
|
+
y: textY + titleLineHeight + titleToContentGap,
|
|
7812
|
+
width: textWidth,
|
|
7813
|
+
height: contentHeight
|
|
7814
|
+
};
|
|
7815
|
+
return {
|
|
7816
|
+
onLeft,
|
|
7817
|
+
titleFontSize,
|
|
7818
|
+
titleLineHeight,
|
|
7819
|
+
contentFontSize,
|
|
7820
|
+
contentLineHeight,
|
|
7821
|
+
imageBox,
|
|
7822
|
+
textBox,
|
|
7823
|
+
contentBox
|
|
7824
|
+
};
|
|
7825
|
+
};
|
|
7826
|
+
const buildWingBlockMark = (spec, block, index) => {
|
|
7827
|
+
var _a, _b, _c, _e;
|
|
7828
|
+
const hasImage = !!block.image;
|
|
7829
|
+
const contentText = Array.isArray(block.content) ? block.content : block.content ? [block.content] : [];
|
|
7830
|
+
const themeColor = getThemeColor(spec);
|
|
7831
|
+
const metrics = getWingBlockMetrics(spec, index);
|
|
7832
|
+
return {
|
|
7833
|
+
type: 'group',
|
|
7834
|
+
id: `storyline-block-${(_a = block.id) !== null && _a !== void 0 ? _a : index}`,
|
|
7835
|
+
name: `storyline-block-${index}`,
|
|
7836
|
+
zIndex: vchart.LayoutZIndex.Mark + 1,
|
|
7837
|
+
style: {
|
|
7838
|
+
x: (_d, ctx) => getWingBlockCenter(spec, ctx, index).x,
|
|
7839
|
+
y: (_d, ctx) => getWingBlockCenter(spec, ctx, index).y
|
|
7840
|
+
},
|
|
7841
|
+
children: [
|
|
7842
|
+
{
|
|
7843
|
+
type: 'symbol',
|
|
7844
|
+
name: `storyline-block-image-halo-${index}`,
|
|
7845
|
+
interactive: false,
|
|
7846
|
+
style: {
|
|
7847
|
+
x: 0,
|
|
7848
|
+
y: 0,
|
|
7849
|
+
size: Math.max(metrics.imageBox.width, metrics.imageBox.height) + 12,
|
|
7850
|
+
symbolType: 'circle',
|
|
7851
|
+
fill: withAlpha(themeColor, 0.18),
|
|
7852
|
+
stroke: themeColor,
|
|
7853
|
+
lineWidth: 1.5
|
|
7854
|
+
}
|
|
7855
|
+
},
|
|
7856
|
+
hasImage
|
|
7857
|
+
? Object.assign(Object.assign({ type: 'image', name: `storyline-block-image-${index}`, interactive: false }, omitImageLayoutSpec(spec.image)), { style: Object.assign({ x: metrics.imageBox.x, y: metrics.imageBox.y, width: metrics.imageBox.width, height: metrics.imageBox.height, image: block.image, cornerRadius: Math.min(metrics.imageBox.width, metrics.imageBox.height) / 2, repeatX: 'no-repeat', repeatY: 'no-repeat', imageMode: 'cover', imagePosition: 'center', stroke: '#ffffff', lineWidth: 3 }, (_b = spec.image) === null || _b === void 0 ? void 0 : _b.style) })
|
|
7858
|
+
: {
|
|
7859
|
+
type: 'rect',
|
|
7860
|
+
name: `storyline-block-image-bg-${index}`,
|
|
7861
|
+
interactive: false,
|
|
7862
|
+
style: {
|
|
7863
|
+
x: metrics.imageBox.x,
|
|
7864
|
+
y: metrics.imageBox.y,
|
|
7865
|
+
width: metrics.imageBox.width,
|
|
7866
|
+
height: metrics.imageBox.height,
|
|
7867
|
+
cornerRadius: Math.min(metrics.imageBox.width, metrics.imageBox.height) / 2,
|
|
7868
|
+
fill: '#ffffff',
|
|
7869
|
+
stroke: themeColor,
|
|
7870
|
+
lineWidth: 2
|
|
7871
|
+
}
|
|
7872
|
+
},
|
|
7873
|
+
block.title
|
|
7874
|
+
? Object.assign(Object.assign({ type: 'text', name: `storyline-block-title-${index}`, interactive: false, zIndex: vchart.LayoutZIndex.Mark + 10 }, spec.title), { style: Object.assign({ x: metrics.onLeft ? metrics.textBox.x + metrics.textBox.width : metrics.textBox.x, y: metrics.textBox.y, text: block.title, maxLineWidth: metrics.textBox.width, fontSize: metrics.titleFontSize, lineHeight: metrics.titleLineHeight, fontWeight: 'bold', fill: themeColor, textAlign: metrics.onLeft ? 'right' : 'left', textBaseline: 'top' }, (_c = spec.title) === null || _c === void 0 ? void 0 : _c.style) })
|
|
7875
|
+
: null,
|
|
7876
|
+
contentText.length
|
|
7877
|
+
? Object.assign(Object.assign({ type: 'text', name: `storyline-block-content-${index}`, interactive: false, zIndex: vchart.LayoutZIndex.Mark + 10 }, spec.content), { textType: 'rich', style: Object.assign({ x: metrics.onLeft ? metrics.contentBox.x + metrics.contentBox.width : metrics.contentBox.x, y: metrics.contentBox.y, width: metrics.contentBox.width, height: metrics.contentBox.height, maxLineWidth: metrics.contentBox.width, heightLimit: metrics.contentBox.height, text: buildRichContent(contentText, spec), fontSize: WING_CONTENT_FONT_SIZE, lineHeight: WING_CONTENT_LINE_HEIGHT, textAlign: metrics.onLeft ? 'right' : 'left', textBaseline: 'top', wordBreak: 'break-word', ellipsis: '...', fill: '#1f2430' }, (_e = spec.content) === null || _e === void 0 ? void 0 : _e.style) })
|
|
7878
|
+
: null
|
|
7879
|
+
].filter(Boolean)
|
|
7880
|
+
};
|
|
7881
|
+
};
|
|
7882
|
+
|
|
7637
7883
|
class StorylineChartSpecTransformer extends vchart.CommonChartSpecTransformer {
|
|
7638
7884
|
transformSpec(spec) {
|
|
7639
7885
|
var _a;
|
|
@@ -7651,28 +7897,31 @@
|
|
|
7651
7897
|
}
|
|
7652
7898
|
const applyDefaultPadding = (spec) => {
|
|
7653
7899
|
var _a, _b, _c, _d;
|
|
7654
|
-
const
|
|
7655
|
-
const
|
|
7900
|
+
const LARGE = 100;
|
|
7901
|
+
const SMALL = 20;
|
|
7902
|
+
const bowl = isBowl(spec);
|
|
7903
|
+
const defaultTop = bowl ? LARGE : SMALL;
|
|
7904
|
+
const defaultBottom = bowl ? SMALL : LARGE;
|
|
7656
7905
|
const p = spec.padding;
|
|
7657
7906
|
if (p === undefined || p === null) {
|
|
7658
|
-
spec.padding = [
|
|
7907
|
+
spec.padding = [defaultTop, SMALL, defaultBottom, SMALL];
|
|
7659
7908
|
return;
|
|
7660
7909
|
}
|
|
7661
7910
|
if (typeof p === 'number') {
|
|
7662
|
-
spec.padding = [p, p, Math.max(p,
|
|
7911
|
+
spec.padding = bowl ? [Math.max(p, LARGE), p, p, p] : [p, p, Math.max(p, LARGE), p];
|
|
7663
7912
|
return;
|
|
7664
7913
|
}
|
|
7665
7914
|
if (Array.isArray(p)) {
|
|
7666
|
-
const [t
|
|
7667
|
-
spec.padding = [t, r, b !== null && b !== void 0 ? b :
|
|
7915
|
+
const [t, r = SMALL, b, l = SMALL] = p;
|
|
7916
|
+
spec.padding = [t !== null && t !== void 0 ? t : defaultTop, r, b !== null && b !== void 0 ? b : defaultBottom, l];
|
|
7668
7917
|
return;
|
|
7669
7918
|
}
|
|
7670
7919
|
if (typeof p === 'object') {
|
|
7671
7920
|
spec.padding = {
|
|
7672
|
-
top: (_a = p.top) !== null && _a !== void 0 ? _a :
|
|
7673
|
-
right: (_b = p.right) !== null && _b !== void 0 ? _b :
|
|
7674
|
-
bottom: (_c = p.bottom) !== null && _c !== void 0 ? _c :
|
|
7675
|
-
left: (_d = p.left) !== null && _d !== void 0 ? _d :
|
|
7921
|
+
top: (_a = p.top) !== null && _a !== void 0 ? _a : defaultTop,
|
|
7922
|
+
right: (_b = p.right) !== null && _b !== void 0 ? _b : SMALL,
|
|
7923
|
+
bottom: (_c = p.bottom) !== null && _c !== void 0 ? _c : defaultBottom,
|
|
7924
|
+
left: (_d = p.left) !== null && _d !== void 0 ? _d : SMALL
|
|
7676
7925
|
};
|
|
7677
7926
|
}
|
|
7678
7927
|
};
|
|
@@ -7701,6 +7950,10 @@
|
|
|
7701
7950
|
const centerImageMark = buildClockCenterImageMark(spec);
|
|
7702
7951
|
return [ringsMark, ...blockMarks, centerImageMark].filter(Boolean);
|
|
7703
7952
|
}
|
|
7953
|
+
if (isWing(spec)) {
|
|
7954
|
+
const arcMark = buildWingArcMark(spec);
|
|
7955
|
+
return [arcMark, ...blockMarks].filter(Boolean);
|
|
7956
|
+
}
|
|
7704
7957
|
return [lineMark, ...blockMarks].filter(Boolean);
|
|
7705
7958
|
};
|
|
7706
7959
|
const buildLineMark = (spec) => {
|
|
@@ -7732,6 +7985,9 @@
|
|
|
7732
7985
|
if (isClock(spec)) {
|
|
7733
7986
|
return buildClockBlockMark(spec, block, index);
|
|
7734
7987
|
}
|
|
7988
|
+
if (isWing(spec)) {
|
|
7989
|
+
return buildWingBlockMark(spec, block, index);
|
|
7990
|
+
}
|
|
7735
7991
|
return buildDefaultBlockMark(spec, block, index);
|
|
7736
7992
|
};
|
|
7737
7993
|
|