add support for uniqueLegend