adds legend_options and updates viewer_options