Added support to generate legends across all chart types.