@visactor/vchart
Version:
charts lib based @visactor/VGrammar
44 lines (29 loc) • 1.93 kB
JavaScript
import { registerBarSeries } from "../../series/bar/bar";
import { SeriesTypeEnum } from "../../series/interface/type";
import { BaseHistogramChart } from "./base/base";
import { Factory } from "../../core/factory";
import { HistogramChartSpecTransformer } from "./histogram-transformer";
import { registerDimensionHover } from "../../interaction/triggers/dimension-hover";
import { registerDimensionEvents } from "../../event/events";
import { getCartesianDimensionInfo, getDimensionInfoByValue } from "../../event/events/dimension/util/cartesian";
import { getCartesianCrosshairRect } from "../../component/crosshair/utils/cartesian";
import { registerDimensionTooltipProcessor } from "../../component/tooltip/processor/dimension-tooltip";
import { registerMarkTooltipProcessor } from "../../component/tooltip/processor/mark-tooltip";
import { registerGroupTooltipProcessor } from "../../component/tooltip/processor/group-tooltip";
export class HistogramChart extends BaseHistogramChart {
constructor() {
super(...arguments), this.transformerConstructor = HistogramChartSpecTransformer,
this.type = "histogram", this.seriesType = SeriesTypeEnum.bar;
}
_setModelOption() {
this._modelOption.getDimensionInfo = getCartesianDimensionInfo, this._modelOption.getDimensionInfoByValue = getDimensionInfoByValue,
this._modelOption.getRectByDimensionData = getCartesianCrosshairRect;
}
}
HistogramChart.type = "histogram", HistogramChart.seriesType = SeriesTypeEnum.bar,
HistogramChart.transformerConstructor = HistogramChartSpecTransformer;
export const registerHistogramChart = () => {
registerDimensionTooltipProcessor(), registerMarkTooltipProcessor(), registerGroupTooltipProcessor(),
registerDimensionEvents(), registerDimensionHover(), registerBarSeries(), Factory.registerChart(HistogramChart.type, HistogramChart);
};
//# sourceMappingURL=histogram.js.map