diff --git a/display/render.py b/display/render.py index 3008053..4f3e286 100644 --- a/display/render.py +++ b/display/render.py @@ -29,14 +29,14 @@ def name_from_field(field: str) -> str : def main(): stats_fn, web_render = parse_args() data = load_data(stats_fn) - + render(data, web_render) def load_data(stats_fn: str): with open(stats_fn) as stats_f: data = json.load(stats_f) - + data_dict = {name_from_field(field): [0]*len(data) for field in data[0]} print("Found", len(data), "points") @@ -55,7 +55,6 @@ def load_data(stats_fn: str): def render(data: dict, web_render:bool=False): bar_chart = pygal.StackedBar(height=400, legend_box_size=5, x_label_rotation=25) labels = [d.strftime("%B %d %H:%M") for d in data["date"]] - print(labels) bar_chart.x_labels = labels for k in data: if k == "date": @@ -63,7 +62,7 @@ def render(data: dict, web_render:bool=False): #if "db" in k or "database" in k or "mysql" in k or "mongo" in k or "postgre" in k: # continue bar_chart.add(k, data[k]) - + if web_render: bar_chart.render_in_browser() else: diff --git a/display/render_stats.sh b/display/render_stats.sh index 64a4f85..e265e08 100755 --- a/display/render_stats.sh +++ b/display/render_stats.sh @@ -15,7 +15,7 @@ if [[ $# -ne 1 ]] && [[ $# -ne 2 ]]; then echo " - stats_file: path to stats file" echo "" echo "Options:" - echo " - w: do rende1r using web browser" + echo " - w: do render using web browser" exit 1 fi