quantitative = ({
controls: [
{ type: "text", value: "// Temp. over time\nPlot.plot({" },
{ type: "text", value: "marks:[Plot.dot(data, {", indent: 1 },
{ param: "fill", value: "air_temp" },
{ type: "text", value: "})],", indent: 1 },
{ type: "text", value: "color: {", indent: 1 },
{ param: "scheme", type: "select", value: "scheme", options: scheme },
{ param: "type", type: "select", options: quantScaleTypes },
{ type: "text", value: "// Clamp the domain", indent: 2 },
{ param: "domain", type: "textInput", value: `[0, 30]` },
{ type: "text", value: `// Restrict output range`, indent: 2 },
{ param: "range", type: "textInput", value: `[0, 1]` },
{ type: "text", value: "}})" }
],
plot: (config) => `Plot.plot({
marks: [Plot.dot(data, { x: "date", y: "air_temp", fill: "air_temp" })],
color: {
type: "${config.type}",
scheme: "${config.scheme}",
legend: true${config.domain ? `,\n\t\tdomain: ${config.domain}` : ''}${config.range ? `,\n\t\trange: ${config.range}` : ""}
},
width: ${plotWidth}
})`
})