mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-28 02:58:18 +08:00
Charts: Fix column number
This commit is contained in:
@@ -34,7 +34,11 @@ return Backbone.View.extend(
|
||||
self.d3_chart = nv.models.multiBarChart();
|
||||
|
||||
self.d3_chart.xAxis.tickFormat(d3.format('.2f'))
|
||||
self.d3_chart.yAxis.tickFormat(d3.format('.1f'))
|
||||
.axisLabel('Breaks');
|
||||
|
||||
self.d3_chart.yAxis.tickFormat(d3.format('.3f'))
|
||||
.axisLabel('Frequency')
|
||||
.axisLabelDistance(30);
|
||||
|
||||
self.options.svg.datum(data)
|
||||
.call(self.d3_chart);
|
||||
|
||||
@@ -115,7 +115,7 @@ return Backbone.Collection.extend(
|
||||
|
||||
// read value from row
|
||||
var v = row[index];
|
||||
if(isNaN(v)) {
|
||||
if(isNaN(v) || !v) {
|
||||
v = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,14 @@ return Backbone.Model.extend(
|
||||
}
|
||||
}
|
||||
},
|
||||
'horizontal' : {
|
||||
title : 'Bar diagram (horizontal)',
|
||||
columns : {
|
||||
y : {
|
||||
title : 'Values for y-axis'
|
||||
}
|
||||
}
|
||||
},
|
||||
'histogram' : {
|
||||
title : 'Histogram',
|
||||
mode : 'execute',
|
||||
@@ -23,14 +31,6 @@ return Backbone.Model.extend(
|
||||
}
|
||||
}
|
||||
},
|
||||
'horizontal' : {
|
||||
title : 'Bar diagram (horizontal)',
|
||||
columns : {
|
||||
y : {
|
||||
title : 'Values for y-axis'
|
||||
}
|
||||
}
|
||||
},
|
||||
'line' : {
|
||||
title : 'Line chart',
|
||||
columns : {
|
||||
|
||||
@@ -246,13 +246,12 @@ return Backbone.View.extend(
|
||||
var group_index = 0;
|
||||
chart.groups.each(function(group) {
|
||||
for (var key in chart_settings.columns) {
|
||||
request_string += key + '_' + (++group_index) + ':' + group.get(key) + ', ';
|
||||
request_string += key + '_' + (++group_index) + ':' + (parseInt(group.get(key)) + 1) + ', ';
|
||||
}
|
||||
});
|
||||
|
||||
// return
|
||||
return 'columns : 2';
|
||||
//return request_string.substring(0, request_string.length - 2);
|
||||
return request_string.substring(0, request_string.length - 2);
|
||||
},
|
||||
|
||||
// create default chart request
|
||||
|
||||
Reference in New Issue
Block a user