@visactor/vchart
Version:
charts lib based @visactor/VGrammar
32 lines (25 loc) • 2.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.registerWaterfallChart = exports.WaterfallChart = void 0;
const type_1 = require("../../series/interface/type"), bar_1 = require("../bar"), waterfall_1 = require("../../series/waterfall/waterfall"), factory_1 = require("../../core/factory"), waterfall_transformer_1 = require("./waterfall-transformer"), dimension_hover_1 = require("../../interaction/triggers/dimension-hover"), events_1 = require("../../event/events"), cartesian_1 = require("../../event/events/dimension/util/cartesian"), cartesian_2 = require("../../component/crosshair/utils/cartesian"), dimension_tooltip_1 = require("../../component/tooltip/processor/dimension-tooltip"), mark_tooltip_1 = require("../../component/tooltip/processor/mark-tooltip"), group_tooltip_1 = require("../../component/tooltip/processor/group-tooltip");
class WaterfallChart extends bar_1.BarChart {
constructor() {
super(...arguments), this.transformerConstructor = waterfall_transformer_1.WaterfallChartSpecTransformer,
this.type = "waterfall", this.seriesType = type_1.SeriesTypeEnum.waterfall;
}
_setModelOption() {
this._modelOption.getDimensionInfo = cartesian_1.getCartesianDimensionInfo, this._modelOption.getDimensionInfoByValue = cartesian_1.getDimensionInfoByValue,
this._modelOption.getRectByDimensionData = cartesian_2.getCartesianCrosshairRect;
}
}
exports.WaterfallChart = WaterfallChart, WaterfallChart.type = "waterfall", WaterfallChart.seriesType = type_1.SeriesTypeEnum.waterfall,
WaterfallChart.transformerConstructor = waterfall_transformer_1.WaterfallChartSpecTransformer;
const registerWaterfallChart = () => {
(0, dimension_tooltip_1.registerDimensionTooltipProcessor)(), (0, mark_tooltip_1.registerMarkTooltipProcessor)(),
(0, group_tooltip_1.registerGroupTooltipProcessor)(), (0, events_1.registerDimensionEvents)(),
(0, dimension_hover_1.registerDimensionHover)(), (0, waterfall_1.registerWaterfallSeries)(),
factory_1.Factory.registerChart(WaterfallChart.type, WaterfallChart);
};
exports.registerWaterfallChart = registerWaterfallChart;
//# sourceMappingURL=waterfall.js.map