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

52 lines (47 loc) 1.21 kB
import { color, data, discreteLegend } from "./common"; export const waterfallField = context => { const {cell: cell, spec: spec} = context; return spec.xField = cell.x, spec.yField = cell.y, spec.total = { type: "end", text: "总计" }, { spec: spec }; }; export const waterfallAxes = context => { const {spec: spec} = context; return spec.axes = [ { orient: "left", title: { visible: !0, text: "favorability" }, label: { formatMethod: v => v + "%" } }, { orient: "bottom", label: { visible: !0 }, type: "band", paddingInner: .4, title: { visible: !0, text: "date" } } ], { spec: spec }; }; export const waterfallStackLabel = context => { const {spec: spec} = context; return spec.stackLabel = { valueType: "absolute", formatMethod: text => text + "%" }, { spec: spec }; }; export const pipelineWaterfall = [ data, color, waterfallField, waterfallAxes, waterfallStackLabel, discreteLegend ]; //# sourceMappingURL=waterfall.js.map