-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
196 additions
and
314 deletions.
There are no files selected for viewing
18 changes: 7 additions & 11 deletions
18
config/plugins/visualizations/charts/static/charts/nvd3/bar/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
// dependencies | ||
define(['plugin/charts/nvd3/common/wrapper'], function(NVD3) { | ||
|
||
// widget | ||
return Backbone.Model.extend({ | ||
initialize: function(app, options) { | ||
options.type = 'multiBarChart'; | ||
new NVD3(app, options); | ||
} | ||
}); | ||
|
||
define( [ 'plugin/charts/nvd3/common/wrapper' ], function( NVD3 ) { | ||
return Backbone.Model.extend({ | ||
initialize: function( app, options ) { | ||
options.type = 'multiBarChart'; | ||
new NVD3( app, options ); | ||
} | ||
}); | ||
}); |
18 changes: 7 additions & 11 deletions
18
config/plugins/visualizations/charts/static/charts/nvd3/bar_horizontal/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
// dependencies | ||
define(['plugin/charts/nvd3/common/wrapper'], function(NVD3) { | ||
|
||
// widget | ||
return Backbone.Model.extend({ | ||
initialize: function(app, options) { | ||
options.type = 'multiBarHorizontalChart'; | ||
new NVD3(app, options); | ||
} | ||
}); | ||
|
||
define( [ 'plugin/charts/nvd3/common/wrapper' ], function( NVD3 ) { | ||
return Backbone.Model.extend({ | ||
initialize: function( app, options ) { | ||
options.type = 'multiBarHorizontalChart'; | ||
new NVD3( app, options ); | ||
} | ||
}); | ||
}); |
24 changes: 10 additions & 14 deletions
24
config/plugins/visualizations/charts/static/charts/nvd3/bar_horizontal_stacked/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
// dependencies | ||
define(['plugin/charts/nvd3/common/wrapper'], function(NVD3) { | ||
|
||
// widget | ||
return Backbone.Model.extend({ | ||
initialize: function(app, options) { | ||
options.type = 'multiBarHorizontalChart'; | ||
options.makeConfig = function(nvd3_model) { | ||
nvd3_model.stacked(true); | ||
}; | ||
new NVD3(app, options); | ||
} | ||
}); | ||
|
||
define( [ 'plugin/charts/nvd3/common/wrapper' ], function( NVD3 ) { | ||
return Backbone.Model.extend({ | ||
initialize: function( app, options ) { | ||
options.type = 'multiBarHorizontalChart'; | ||
options.makeConfig = function( nvd3_model ) { | ||
nvd3_model.stacked( true ); | ||
}; | ||
new NVD3( app, options ); | ||
} | ||
}); | ||
}); |
24 changes: 10 additions & 14 deletions
24
config/plugins/visualizations/charts/static/charts/nvd3/bar_stacked/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
// dependencies | ||
define(['plugin/charts/nvd3/common/wrapper'], function(NVD3) { | ||
|
||
// widget | ||
return Backbone.Model.extend({ | ||
initialize: function(app, options) { | ||
options.type = 'multiBarChart'; | ||
options.makeConfig = function(nvd3_model) { | ||
nvd3_model.stacked(true); | ||
}; | ||
new NVD3(app, options); | ||
} | ||
}); | ||
|
||
define( [ 'plugin/charts/nvd3/common/wrapper' ], function( NVD3 ) { | ||
return Backbone.Model.extend({ | ||
initialize: function( app, options ) { | ||
options.type = 'multiBarChart'; | ||
options.makeConfig = function( nvd3_model ) { | ||
nvd3_model.stacked( true ); | ||
}; | ||
new NVD3( app, options ); | ||
} | ||
}); | ||
}); |
51 changes: 21 additions & 30 deletions
51
config/plugins/visualizations/charts/static/charts/nvd3/histogram/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,25 @@ | ||
// dependencies | ||
define(['plugin/charts/nvd3/common/wrapper'], function(NVD3) { | ||
|
||
// widget | ||
return Backbone.Model.extend({ | ||
initialize: function(app, options) { | ||
// link request | ||
var request_dictionary = options.request_dictionary; | ||
|
||
// configure request | ||
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++ | ||
define( [ 'plugin/charts/nvd3/common/wrapper' ], function( NVD3 ) { | ||
return Backbone.Model.extend({ | ||
initialize: function( app, options ) { | ||
var request_dictionary = options.request_dictionary; | ||
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.type = 'multiBarChart'; | ||
options.makeConfig = function( nvd3_model ) { | ||
nvd3_model.options( { showControls: true } ); | ||
}; | ||
new NVD3( app, options ); | ||
} | ||
|
||
// setup chart wrapper | ||
options.type = 'multiBarChart'; | ||
options.makeConfig = function(nvd3_model) { | ||
nvd3_model.options({showControls: true}); | ||
}; | ||
new NVD3(app, options); | ||
} | ||
}); | ||
|
||
}); | ||
}); |
68 changes: 27 additions & 41 deletions
68
config/plugins/visualizations/charts/static/charts/nvd3/histogram_discrete/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,30 @@ | ||
// dependencies | ||
define(['plugin/charts/nvd3/common/wrapper'], function(NVD3) { | ||
|
||
// widget | ||
return Backbone.Model.extend({ | ||
initialize: function(app, options) { | ||
// link request | ||
var request_dictionary = options.request_dictionary; | ||
|
||
// configure request | ||
var index = 1; | ||
var tmp_dict = { | ||
id : request_dictionary.id, | ||
groups : [] | ||
}; | ||
|
||
// configure groups | ||
for (var group_index in request_dictionary.groups) { | ||
var group = request_dictionary.groups[group_index]; | ||
tmp_dict.groups.push({ | ||
key : group.key, | ||
columns : { | ||
x: { | ||
index : 0, | ||
is_label : true | ||
}, | ||
y: { | ||
index : index++ | ||
define( [ 'plugin/charts/nvd3/common/wrapper' ], function( NVD3 ) { | ||
return Backbone.Model.extend({ | ||
initialize: function( app, options ) { | ||
var request_dictionary = options.request_dictionary; | ||
var index = 1; | ||
var tmp_dict = { id : request_dictionary.id, groups : [] }; | ||
for ( var group_index in request_dictionary.groups ) { | ||
var group = request_dictionary.groups[ group_index ]; | ||
tmp_dict.groups.push({ | ||
key : group.key, | ||
columns : { | ||
x: { | ||
index : 0, | ||
is_label : true | ||
}, | ||
y: { | ||
index : index++ | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
} | ||
options.type = 'multiBarChart'; | ||
options.request_dictionary = tmp_dict; | ||
options.makeConfig = function( nvd3_model ) { | ||
nvd3_model.options( { showControls: true } ); | ||
}; | ||
new NVD3( app, options ); | ||
} | ||
|
||
// setup chart wrapper | ||
options.type = 'multiBarChart'; | ||
options.request_dictionary = tmp_dict; | ||
options.makeConfig = function(nvd3_model) { | ||
nvd3_model.options({showControls: true}); | ||
}; | ||
new NVD3(app, options); | ||
} | ||
}); | ||
|
||
}); | ||
}); |
18 changes: 7 additions & 11 deletions
18
config/plugins/visualizations/charts/static/charts/nvd3/line/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
// dependencies | ||
define(['plugin/charts/nvd3/common/wrapper'], function(NVD3) { | ||
|
||
// widget | ||
return Backbone.Model.extend({ | ||
initialize: function(app, options) { | ||
options.type = 'lineChart'; | ||
new NVD3(app, options); | ||
} | ||
}); | ||
|
||
define( [ 'plugin/charts/nvd3/common/wrapper' ], function( NVD3 ) { | ||
return Backbone.Model.extend({ | ||
initialize: function( app, options ) { | ||
options.type = 'lineChart'; | ||
new NVD3( app, options ); | ||
} | ||
}); | ||
}); |
18 changes: 7 additions & 11 deletions
18
config/plugins/visualizations/charts/static/charts/nvd3/line_focus/wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
// dependencies | ||
define(['plugin/charts/nvd3/common/wrapper'], function(NVD3) { | ||
|
||
// widget | ||
return Backbone.Model.extend({ | ||
initialize: function(app, options) { | ||
options.type = 'lineWithFocusChart'; | ||
new NVD3(app, options); | ||
} | ||
}); | ||
|
||
define( [ 'plugin/charts/nvd3/common/wrapper' ], function( NVD3 ) { | ||
return Backbone.Model.extend({ | ||
initialize: function( app, options ) { | ||
options.type = 'lineWithFocusChart'; | ||
new NVD3( app, options ); | ||
} | ||
}); | ||
}); |
Oops, something went wrong.