Skip to content

Commit

Permalink
Revise histogram wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 20, 2016
1 parent 12f87ef commit 13d35ba
Showing 1 changed file with 5 additions and 14 deletions.
Expand Up @@ -2,21 +2,12 @@ define( [ 'plugin/charts/utilities', 'plugin/library/jobs', 'plugin/charts/nvd3/
return Backbone.Model.extend({
initialize: function( app, options ) {
Jobs.request( app, 'histogram', function( dataset ) {
var request_dictionary = Utilities.tabularRequestDictionary( app.chart, dataset.id );
options.request_dictionary = Utilities.tabularRequestDictionary( app.chart, dataset.id );
var index = 1;
for ( var i in request_dictionary.groups ) {
var group = request_dictionary.groups[ i ];
group.columns = {
x: {
index : 0,
is_numeric : true
},
y: {
index : index++
}
}
}
options.request_dictionary = request_dictionary;
_.each( options.request_dictionary.groups, function( group ) {
group.columns = { x : { index : 0, is_numeric : true },
y : { index : index++ } }
});
options.type = 'multiBarChart';
options.makeConfig = function( nvd3_model ) {
nvd3_model.options( { showControls: true } );
Expand Down

0 comments on commit 13d35ba

Please sign in to comment.