G2PlotColumn = {
function G2PlotColumn(options) {
const {
style = {},
scale,
axis,
legend,
slider,
scrollbar,
labels
} = options;
const DEFAULT_BACKGROUND_OPTIONS = {
style: { fillOpacity: 0.15, fill: "rgb(180, 180, 180)" }
};
const { background } = style;
const primary = {
...defineMark("interval", options, {}, "column"),
scale: assignDeep({ x: { paddingOuter: 0.2, paddingInner: 0.2 } }, scale),
axis: assignDeep({ x: { title: false } }, axis),
legend,
slider,
scrollbar,
labels,
style: omitObject(style, ["background"])
};
const backgroundDescriptor = assignDeep(
{},
defineMark("interval", options, DEFAULT_BACKGROUND_OPTIONS, "background"),
{
encode: { y: 1 },
scale: { y: { independent: true, range: [0, 1] } },
axis: { y: false }
}
);
return () => {
return compact([background && backgroundDescriptor, primary]);
};
}
G2PlotColumn.props = { composite: true };
return G2PlotColumn;
}