add legend and data sources