scatterplot = {
const plot = new deepscatter.default("#plot", 900, 600);
await plot.plotAPI({
arrow_table: votes,
point_size: 2.5,
max_points: 5e5,
zoom_balance: 0.35,
alpha: 40,
background_color: "#FFFAF2",
encoding: {
jitter_size: {},
color: {
field: "candidate",
range: "dark2"
},
x: {
field: "x",
transform: "literal"
},
y: {
field: "y",
transform: "literal"
}
}
});
invalidation.then(() => plot.destroy());
return plot;
}