def test_config(): class LolConfig(Config): js = ['http://l:2343/2.0.x/pygal-tooltips.js'] stacked = StackedBar(LolConfig()) stacked.add('', [1, 2, 3]) stacked.add('My beautiful serie of 2019', [4, 5, 6]) return stacked.render_response()
def test_config(): class LolConfig(Config): js = ["http://l:2343/svg.jquery.js", "http://l:2343/pygal-tooltips.js"] stacked = StackedBar(LolConfig()) stacked.add("1", [1, 2, 3]) stacked.add("2", [4, 5, 6]) return stacked.render_response()
def test_bar_print_values_position(): bar = StackedBar(print_values=True, print_values_position='top', zero=2, style=styles['default']( value_font_family='googlefont:Raleway', value_font_size=46)) bar.add('1', [1, -2, 3]) bar.add('2', [4, -5, 6]) bar.x_labels = [2, 4, 6] bar.x_labels_major = [4] return bar.render_response()
def test_bar_print_values_position(): bar = StackedBar( print_values=True, print_values_position="top", zero=2, style=styles["default"](value_font_family="googlefont:Raleway", value_font_size=46), ) bar.add("1", [1, -2, 3]) bar.add("2", [4, -5, 6]) bar.x_labels = [2, 4, 6] bar.x_labels_major = [4] return bar.render_response()
def test_stacked_reverse(): stacked = StackedBar(stack_from_top=True) stacked.add('1', [1, 2, 3]) stacked.add('2', [4, 5, 6]) return stacked.render_response()
def test_stacked(): stacked = StackedBar() stacked.add('1', [1, 2, 3]) stacked.add('2', [4, 5, 6]) return stacked.render_response()