Update dynamic legend creation.