@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
60 lines (52 loc) • 1.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.pipelineWaterfall = exports.waterfallStackLabel = exports.waterfallAxes = exports.waterfallField = void 0;
const common_1 = require("./common"), waterfallField = context => {
const {cell: cell, spec: spec} = context;
return spec.xField = cell.x, spec.yField = cell.y, spec.total = {
type: "end",
text: "总计"
}, {
spec: spec
};
};
exports.waterfallField = waterfallField;
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
};
};
exports.waterfallAxes = waterfallAxes;
const waterfallStackLabel = context => {
const {spec: spec} = context;
return spec.stackLabel = {
valueType: "absolute",
formatMethod: text => text + "%"
}, {
spec: spec
};
};
exports.waterfallStackLabel = waterfallStackLabel, exports.pipelineWaterfall = [ common_1.data, common_1.color, exports.waterfallField, exports.waterfallAxes, exports.waterfallStackLabel, common_1.discreteLegend ];
//# sourceMappingURL=waterfall.js.map