first_plot = {
console.log("Submitting a chart update via plotAPI...");
plot
.plotAPI({
source_url: "https://benschmidt.org/arxiv",
background_color: "#ffffff",
max_points: 10000,
point_size: 16,
alpha: 5,
encoding: {
x: {
field: "x"
},
y: {
field: "y"
},
color: {
constant: "#00ff00"
}
}
})
.then(() => {
console.log("... chart update done!");
});
console.log("I am synchronous code, so I fire before the update finishes!");
return plot;
}