UNPKG

@visactor/vmind

Version:

<div align="center"> <a href="https://github.com/VisActor#gh-light-mode-only" target="_blank"> <img alt="VisActor Logo" width="200" src="https://github.com/VisActor/.github/blob/main/profile/logo_500_200_light.svg"/> </a> <a href="https://githu

62 lines (57 loc) 1.6 kB
import { color, data, discreteLegend } from "./common"; export const radarField = context => { var _a, _b; const {cell: cell, spec: spec} = context; return (cell.x || cell.angle) && (spec.categoryField = null !== (_a = cell.x) && void 0 !== _a ? _a : cell.angle), (cell.y || cell.value) && (spec.valueField = null !== (_b = cell.y) && void 0 !== _b ? _b : cell.value), cell.color && (spec.seriesField = cell.color), !spec.categoryField && spec.seriesField && (spec.categoryField = spec.seriesField, delete spec.seriesField), { spec: spec }; }; export const radarDisplayConf = context => { const {spec: spec, chartTheme: chartTheme} = context; return chartTheme || (spec.area = { visible: !0 }), { spec: spec }; }; export const radarAxis = context => { const {spec: spec} = context; return spec.axes = [ { orient: "radius", zIndex: 100, domainLine: { visible: !1 }, label: { visible: !0, space: 0, style: {} }, grid: { smooth: !1, style: {} } }, { orient: "angle", zIndex: 50, tick: { visible: !1 }, domainLine: { visible: !1 }, label: { space: 20 }, grid: { style: {} } } ], { spec: spec }; }; export const pipelineRadar = [ data, color, radarField, radarDisplayConf, radarAxis, discreteLegend ]; //# sourceMappingURL=radar.js.map