refactor (examples.component-legend) needs datacollection to work