diff --git a/routes.py b/routes.py index 034ceee..6bc10ee 100644 --- a/routes.py +++ b/routes.py @@ -170,12 +170,12 @@ def index(): # Convert pandas/numpy int64s to plain old Python ints pivot = pivot.astype(int) labels = list(pivot.index) - data = [int(x) for x in pivot.values] # <- This is what fixes the JSON error + data = [int(x) for x in pivot.values] datasets = [{ - 'type': 'bar', - 'x': labels, - 'y': data, + 'type': 'pie', + 'labels': labels, + 'values': data, 'name': 'Inventory Conditions' }]