Public
Edited
Nov 2, 2023
1 star
Insert cell
Insert cell
Insert cell
colorScale = (d) => {
// Check if the 'rating' is your specific category, e.g., 'SpecificCategoryName'
if (d.rating === "legend") {
return "#CD0000"; // Set the fill color to red
} else {
return "gray"; // Set the fill color to gray for other categories
}
}
Insert cell
horror_legends.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
import { Plot } from "@mkfreeman/plot-tooltip"
Insert cell
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