scaleFreeX = (options) =>
Plot.initializer(options, (data, facets, channels, scales, dimensions) => {
const {x: { value: X, scale }} = channels;
debugger
for (const index of facets) {
const x = d3.scaleBand(d3.sort(Array.from(index, (i) => X[i])), [
dimensions.marginTop,
dimensions.height - dimensions.marginBottom
])
.padding(0.5);
for (const i of index) X[i] = x(X[i]);
}
return { data, facets, channels: { x: { value: X } } };
})