/soc/2012/sanket/www-statscollector: 168895384bf8: Add drilldown...

Sanket Agarwal sanket at soc.pidgin.im
Wed Jul 18 01:36:02 EDT 2012


Changeset: 168895384bf8dd0726a7566b4631539ae0325ecc
Author:	 Sanket Agarwal <sanket at soc.pidgin.im>
Date:	 2012-07-18 11:02 +0530
Branch:	 default
URL: http://hg.pidgin.im/soc/2012/sanket/www-statscollector/rev/168895384bf8

Description:

Add drilldown to only those columns which have ``drilldown'' object

diffstat:

 pidgin_stats_collector/media/js/charts.js |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (18 lines):

diff --git a/pidgin_stats_collector/media/js/charts.js b/pidgin_stats_collector/media/js/charts.js
--- a/pidgin_stats_collector/media/js/charts.js
+++ b/pidgin_stats_collector/media/js/charts.js
@@ -83,10 +83,13 @@
                         events: {
                             click: function() {
                                 var drilldown = this.drilldown;
+                                
                                 if (drilldown) { // drill down
                                     setChart(drilldown.name, drilldown.categories, drilldown.data, drilldown.color);
-                                } else { // restore
+                                    chart.drilled  = true;
+                                } else if(chart.drilled) { // restore
                                     setChart(name, categories, data);
+                                    chart.drilled = false;
                                 }
                             }
                         }



More information about the Commits mailing list