From c9d7089e4343e7abe1653219e21956f6bd324d9b Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Fri, 5 May 2017 10:49:40 +0000 Subject: [PATCH] Fix tooltip on overview chart - Legacy-Id: 13269 --- ietf/stats/views.py | 3 +-- ietf/templates/stats/meeting_stats_overview.html | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ietf/stats/views.py b/ietf/stats/views.py index d00c8b634..71dc9896f 100644 --- a/ietf/stats/views.py +++ b/ietf/stats/views.py @@ -878,7 +878,7 @@ def meeting_stats(request, num=None, stats_type=None): series_data.sort(key=lambda t: t[0]) table_data.sort(key=lambda t: t[0], reverse=True) - chart_data.append({ "data": series_data }) + chart_data.append({ "name": "Registrations", "data": series_data }) elif stats_type == "country": @@ -924,7 +924,6 @@ def meeting_stats(request, num=None, stats_type=None): return render(request, "stats/meeting_stats.html", { "chart_data": mark_safe(json.dumps(chart_data)), - "use_legend": chart_data and chart_data[0].get("name"), "piechart_data": mark_safe(json.dumps(piechart_data)), "table_data": table_data, "stats_title": stats_title, diff --git a/ietf/templates/stats/meeting_stats_overview.html b/ietf/templates/stats/meeting_stats_overview.html index 2b7ffa793..0a44da90b 100644 --- a/ietf/templates/stats/meeting_stats_overview.html +++ b/ietf/templates/stats/meeting_stats_overview.html @@ -15,7 +15,7 @@ animation: false } }, - {% if use_legend %} + {% if stats_type != "overview" %} legend: { align: "right", verticalAlign: "middle", @@ -40,7 +40,7 @@ }, tooltip: { formatter: function () { - var s = '' + this.x + ''; + var s = '' + "IETF " + this.x + ''; $.each(this.points, function () { s += '
' + this.series.name + ': ' + this.y;