UNPKG

cione-comp-lib

Version:

`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`

29 lines (28 loc) 1.13 kB
import { curry } from "../../../../zrender/lib/core/util.mjs"; import { layout, createProgressiveLayout } from "../../layout/barGrid.mjs"; import dataSample from "../../processor/dataSample.mjs"; import BarSeries from "./BarSeries.mjs"; import BarView from "./BarView.mjs"; function install(registers) { registers.registerChartView(BarView); registers.registerSeriesModel(BarSeries); registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout, "bar")); registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout("bar")); registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample("bar")); registers.registerAction({ type: "changeAxisOrder", event: "changeAxisOrder", update: "update" }, function(payload, ecModel) { var componentType = payload.componentType || "series"; ecModel.eachComponent({ mainType: componentType, query: payload }, function(componentModel) { if (payload.sortInfo) { componentModel.axis.setCategorySortInfo(payload.sortInfo); } }); }); } export { install };