mainCharacter = Plot.plot({
...chartStyle,
y: {
type: "symlog",
base: 10,
label: "Ratio ( Likes / Replies )",
ticks: 4
},
x: {
type: "symlog",
base: 10,
label: "Total engagement",
ticks: 2,
tickFormat: d3.format('.2s')
},
// facet: {
// data: snitchesFiltered,
// x: followedColor
// },
color:followedColorSettings,
marks: [
Plot.dotY(snitchesFiltered, {
y: d => {
const ratio = d.likes / d.replies;
if (ratio < 1) {
return -d.replies / d.likes;
}
return ratio;
},
x: "totalEngagement",
fill:followedColor,
title: d => d.tweet,
thresholds: 'scott'}),
Plot.ruleY([0]),
Plot.ruleX([0])
]
});