I would like the legend to follow the colors of the bars in the chart. ![S

I would like the legend to follow the colors of the bars in the chart.
![Stacked Bar Chart]
(https://vaadin.com/attachment/395f4030-fa17-4c4d-8aa5-c3e4813f151d/stacked_bar_chart.png)

I’ve tried using a LegendBuilder, but that did not have the desired effect.

LegendBuilder legendBuilder = LegendBuilder.get();
Labels labels = new Labels();
labels.setUseSeriesColors(true);
legendBuilder.withLabels(labels);

Any idea how to achieve this…?

18174079.png