Permalink
Browse files

fixed replicate selection bug

  • Loading branch information...
1 parent 4dde690 commit 4477ece556ccce1110b00faa5384d59942739ec7 @jeads jeads committed Mar 13, 2013
View
20 datazilla/webapp/static/js/b2g_apps/ReplicateGraphComponent.js
@@ -94,6 +94,9 @@ var ReplicateGraphComponent = new Class({
var totalReplicates = 1;
+ var chartIndex = 0;
+ var detailStructId = 0;
+
for(j=0; j<data.length; j++){
results = data[j]['json_blob']['results'][this.datapoint.url];
@@ -106,20 +109,17 @@ var ReplicateGraphComponent = new Class({
this.data[j]['replicate_range']['start'] = totalReplicates;
for(i=0; i<results.length; i++){
-
- this.chartData['data'].push( [ totalReplicates, results[i] ] );
+ chartIndex = this.chartData['data'].push( [ totalReplicates, results[i] ] );
+ if(chartIndex === 1){
+ detailStructId = j;
+ }
this.hoverData[ totalReplicates ] = j;
totalReplicates++;
}
this.data[j]['replicate_range']['end'] = totalReplicates - 1;
- if( j === 0 ){
- this.view.setDetailContainer(
- this.series, this.datapoint, this.data[j]);
- }
-
this.view.showData(_.isEmpty(this.data));
}
@@ -129,9 +129,13 @@ var ReplicateGraphComponent = new Class({
this.chartOptions
);
+ this.view.setDetailContainer(
+ this.series, this.datapoint, this.data[detailStructId]
+ );
+
//Initialize the replicate detail to first replicate
if(results != undefined){
- this.view.setHoverData(1, results[0]);
+ this.view.setHoverData(1, this.chartData['data'][0][1]);
}
/******
View
2 datazilla/webapp/static/js/b2g_apps/apps-summary-min.js
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 4477ece

Please sign in to comment.