Plot.plot({
width:1000,
height:600,
marginBottom:50,
x: {tickSize:0,
tickPadding:25,
domain: [2016.7,2023.3],
ticks: [2018, 2019, 2020, 2021, 2022],
tickFormat: d3.format("d"),
label:null},
y: {label:null,
ticks:false,
reverse:true},
marks: [
Plot.lineY(data,
{x: "season",
y: "rank",
z: "team_name",
stroke:'#D8DCDC',
strokeWidth:3,
curve: "bump-x"}),
Plot.dot(data,
{x: "season",
y: "rank",
fill:'#D8DCDC'}),
Plot.lineY(data,
{filter: d => accentClubs.includes(d.team_name),
x: "season",
y: "rank", z:
"team_name",
stroke:'team_color',
strokeWidth:3,
curve: "bump-x"}),
Plot.image(firstLastSeason, {src:"team_logo", height:25, width:25, x:"season", y:"rank"}),
Plot.text(firstLastSeason,
{filter: d => d.season===2018,
text: d => d.team_name + ' ' + d.rank,
textAnchor: "end",
fontSize:13,
y:"rank",
x:2017.85}),
Plot.text(firstLastSeason,
{filter: d => d.season===2022,
text: d => d.rank + ' ' + d.team_name,
textAnchor: "start",
fontSize:13,
y:"rank",
x:2022.15})
]
})