From 9e82ec82b7a7d51b98a65cadf9188a5b1a68e662 Mon Sep 17 00:00:00 2001 From: Mokaddem Date: Tue, 2 Aug 2016 16:17:25 +0200 Subject: [PATCH] Fixed a bug in the hover of provider graph (happened when there was an 'other' in other graphs) --- var/www/static/js/moduleTrending.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/var/www/static/js/moduleTrending.js b/var/www/static/js/moduleTrending.js index ff32cc1b..6333c02b 100644 --- a/var/www/static/js/moduleTrending.js +++ b/var/www/static/js/moduleTrending.js @@ -185,13 +185,15 @@ function plot_top_graph(module_name, init){ }) - /* rememeber the data for the two graph */ - if (plot_data_old.length>1){ // avoid adding plot_data for previous clicked pie part - plot_data_old = []; - plot_old = []; + /* rememeber the data for the two provider graph */ + if (chartUrl == "providersChart"){ + if (plot_data_old.length>1){ // avoid adding plot_data for previous clicked pie part + plot_data_old = []; + plot_old = []; + } + plot_data_old.push(plot.getData()); + plot_old.push(plot); } - plot_data_old.push(plot.getData()); - plot_old.push(plot); if (can_bind){ // avoid binding two listener for provider graphs binder(module_name);