Sorry to ask another question so soon, but I’m running into a weird issue. When I compute data for my plot, the plots don’t load when the development server starts, but only when I change some code, save it, change it back again, and save it again.
This is what I’m working with:
The javascript section:
import { DataMaker } from './DataMaker.js';
const dataMaker = new dataMaker();
const a = view(Inputs.range([0, 50], {label: html`a`, step: 0.1}));
const b = view(Inputs.range([0, 1], {label: html`b`, step: 0.01}));
const c = view(Inputs.range([0, 5], {label: html`c`, step: 0.05}));
const data = dataMaker.data(a, b, c);
Then the HTML section:
Plot.plot({
marks: [
Plot.ruleY([0]),
Plot.areaY(data, {x: "energy", y: "flux", curve: "step"}),
Plot.lineY(data, {x: "energy", y: "flux", stroke: "red"})
]
}