diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-04 10:47:01 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-04 10:47:01 -0700 |
commit | 3c80b0a00aabe96c46f7e4b381ddd90e48f3d89d (patch) | |
tree | b374a3e49e6b5c54183907cce907ea4deaecca31 | |
parent | 8fa5d8ff0b1531e7956e5be9277eecdc145022f4 (diff) |
need to parse the json stringified array in chart data
-rw-r--r-- | system/admin/admin.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/admin/admin.go b/system/admin/admin.go index f6e7d20..b86db2a 100644 --- a/system/admin/admin.go +++ b/system/admin/admin.go @@ -387,7 +387,7 @@ var analyticsHTML = ` datasets: [{ type: 'line', label: 'Unique Clients', - data: {{ .unique }}, + data: $.parseJSON({{ .unique }})), backgroundColor: 'rgba(76, 175, 80, 0.2)', borderColor: 'rgba(76, 175, 80, 1)', borderWidth: 1 @@ -395,7 +395,7 @@ var analyticsHTML = ` { type: 'bar', label: 'Total Requests', - data: {{ .total }}, + data: $.parseJSON({{ .total }}), backgroundColor: 'rgba(33, 150, 243, 0.2)', borderColor: 'rgba(33, 150, 243, 1)', borderWidth: 1 |