Plot.plot({
title: "World Happiness Report Explained by 6 Factors",
subtitle: "Select Factors to see the relation per country",
x: { label: filters.selectX, tickSize: 0 },
y: { label: filters.selectY, tickSize: 0 },
width: 1000,
height: 600,
marks: [
Plot.ruleY([0]),
Plot.ruleX([0]),
Plot.dot(happiness, {
x: filters.selectX,
y: filters.selectY,
title: (d) =>
`${d.country_name}\n ${d[filters.selectX]} \n ${d[filters.selectY]}`,
fill: (d) => (d.country_name === "India" ? "#f18f01" : "#5e548e"),
stroke: (d) => (d.country_name === "India" ? "black" : "white"),
strokeWidth: (d) => (d.country_name === "India" ? 2 : 1),
opacity: 0.9,
r: 8
})
]
})