Rotate date labels
This commit is contained in:
parent
e460e8f49d
commit
cab9498f2b
@ -53,8 +53,10 @@ def load_data(stats_fn: str):
|
|||||||
|
|
||||||
|
|
||||||
def render(data: dict, web_render:bool=False):
|
def render(data: dict, web_render:bool=False):
|
||||||
bar_chart = pygal.StackedBar(height=400)
|
bar_chart = pygal.StackedBar(height=400, legend_box_size=5, x_label_rotation=25)
|
||||||
bar_chart.x_labels = data["date"]
|
labels = [d.strftime("%B %d %H:%M") for d in data["date"]]
|
||||||
|
print(labels)
|
||||||
|
bar_chart.x_labels = labels
|
||||||
for k in data:
|
for k in data:
|
||||||
if k == "date":
|
if k == "date":
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user