Implemented getLegendsgraphics