then doing something like tmp.hvplot.bar() plots bars such that the column names (foo and bar) are rendered in each group (for each ID). How can I avoid that and use a legend for the colors instead?
Support for this was added in https://github.com/holoviz/holoviews/pull/4183 which hasn’t yet been released. In future I think you’ll be able to activate this with tmp.hvplot.bar(multi_level=False)