here is an easier way to solve the split of the names
too bad i don't have editing access, but you can copy-paste this
```
TOOEASY = pizzaorders.map(item => ({ //for every item return this object:
flavor: item.name.split(" Pizza ")[0], //set flavor like so, we benefit from the stable pattern in name that all have " Pizza "
size: item.name.split(" Pizza ")[1], //size done
...item //fill in all the other columns
}));
```
good solution, but has a lot of overplotting
you can fix it easily by setting fy: "nameWithoutSize",
another way to fix it is using dodge transform https://observablehq.com/plot/transforms/dodge
which you can try for extra points :)
then fill can be "category" if you still need it, but i like the color-distinction too
(in my solution i set background color of the boxes to categories)
the dodgeY transform breaks your Y encoding, which you fix below by double-using FY. you could instead use FX instead of Y above and call it a day. much more elegant
Pizza orders | 🪦 dv develop 2025 spring | Observable