I am having issues sorting this chart by date on the y-axis. I am not sure if I am missing a sort transform somewhere or if I am just missing something obvious. It seems like it wants to sort the dates by month rather than in chronological order as I would like.
Plot.plot({
width: 1000,
height: 2000,
marginLeft: 55,
x: { axis: "top", tickFormat: "%" },
y: { axis: "left", label: null },
color: {
scheme: "Spectral",
legend: "ramp",
width: 1300,
label: "Well:"
},
marks: [
Plot.barX(tidy, {
x: "flows",
y: "month",
channels: { month: "month" },
fill: "well",
offset: "normalize",
sort: { y: "-x" },
tip: true
}),
Plot.ruleX([0])
]
})