Public
Edited
Oct 21, 2024
Insert cell
Insert cell
Plot.plot({
marginLeft: 400,
color: {
domain: ["1", "2", "3", "4", "5"],
range: ["grey", "orange", "red", "pink", "black"],
legend: true
},

marks: [
Plot.barX(dataset, {
y: data.accessors.y,
x: data.accessors.x,
fill: data.accessors.z,
order: "z",
sort: {
y: "-x"
}
})
]
})
Insert cell
data = ({
accessors: {
y: "Response_in_Text",
x: "count",
z: "Response_in_Code",
}
})
Insert cell
Insert cell
Plot.plot({
marginLeft: 400,
color: {
legend: true,
domain: ["1", "2", "3", "4", "5"]
},
marks: [
Plot.barX(dataset, {
y: data.accessors.y,
x: data.accessors.x,
fill: data.accessors.z,

sort: {
y: {
value: "x",
order: "ascending"
},
z: {
value: "z",
}
}
})
]
})
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more