def test_ts_chart_with_publish_label_options_happy(): opts = PublishLabelOptions( 'somelabel', y_axis=1, palette_index=PaletteColor.mountain_green, plot_type=PlotType.area_chart, display_name='lol', value_prefix='hi', value_suffix='weee', value_unit='hithere') chart = TimeSeriesChart().with_publish_label_options(opts) assert chart.chart_options['publishLabelOptions'] == [opts.to_dict()]
def test_ts_chart_with_publish_label_options(): """'Legacy' behavior, verified still working.""" opts = PublishLabelOptions( 'somelabel', 0, PaletteColor.mountain_green, PlotType.area_chart, 'foo' ) chart = TimeSeriesChart().with_publish_label_options(opts) assert chart.chart_options['publishLabelOptions'] == [opts.to_dict()]
def test_ts_chart_with_publish_label_options(): opts = PublishLabelOptions('somelabel', 0, PaletteColor.mountain_green, PlotType.area_chart, 'foo') chart = TimeSeriesChart().with_publish_label_options(opts) assert chart.chart_options['publishLabelOptions'] == [opts.to_dict()]