viewof plot0 = {
const p = new Facet("container0", {
padding: [0, 10, 10],
theme: "custom",
appendPadding: [20, 10, 30, 30],
type: "rect",
fields: ["cut"],
cols: 3,
data: data,
axes: {},
meta: {
carat: {
sync: true
},
price: {
sync: true
},
clarity: {
sync: true
}
},
eachView: (view, f) => {
return {
type: "scatter",
options: {
data: f.data,
xField: "carat",
yField: "price",
colorField: "clarity",
shape: "circle",
pointStyle: { fillOpacity: 0.3, stroke: null }
}
};
}
});
p.render();
return p;
}