-
https://observablehq.com/d/43f0286cc828219c I have sorted I want to sort the bars firstly by Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
maybe try |
Beta Was this translation helpful? Give feedback.
-
Like @Fil says, you either want to set the y scale’s domain explicitly (to whatever order you desire, say using d3.sort or d3.groupSort), or you can use imputed ordinal scale domains via the sort mark option. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the guidance. It turns out it can be so simple, but I wanted to try implementing it using the sort option, and I couldn't get it right. My mind was really blanking out. |
Beta Was this translation helpful? Give feedback.
-
I'm really sorry, but I have to ask another question. I added |
Beta Was this translation helpful? Give feedback.
maybe try
y: { label: null, domain: sortedBrands.map(d => d.name) },