I have the following Chartify code snippet.
ch = chartify.Chart(blank_labels=True, x_axis_type='categorical', layout="slide_100%")
ch.set_title("Grouped bar chart")
ch.set_subtitle(
"Pass a list to group by multiple factors. Color grouped by 'fruit'")
ch.plot.bar(
data_frame=df_chart,
categorical_columns=["month", "account"],
numeric_column="bill",
color_column="account",
categorical_order_by=sort_order
)
ch.plot.text(
data_frame=df_chart,
categorical_columns=["month", "account"],
numeric_column='bill',
text_column='billdisp',
color_column='account',
categorical_order_by=sort_order
)
ch.axes.hide_xaxis()
ch.show('png')
It produces the following chart:
Each of the bars correspond to 'account' column. As you can see the X Axis is already crowded as it is.
How do I add a legend to the chart ? I would like to tell that blue = account-1, green = account-2, orange = account 3.