1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/f05fe632cbc7/ Changeset: f05fe632cbc7 User: guerler Date: 2014-05-15 04:18:17 Summary: Charts: Update boxplots and stacked bar Affected #: 5 files diff -r 2b4c26870efbc19441f02da19659c830cc8b591a -r f05fe632cbc70d4694b5a4aa5e30b4f003952aa1 config/plugins/visualizations/charts/static/charts/highcharts_boxplot/logo.png Binary file config/plugins/visualizations/charts/static/charts/highcharts_boxplot/logo.png has changed diff -r 2b4c26870efbc19441f02da19659c830cc8b591a -r f05fe632cbc70d4694b5a4aa5e30b4f003952aa1 config/plugins/visualizations/charts/static/charts/highcharts_boxplot/wrapper.js --- /dev/null +++ b/config/plugins/visualizations/charts/static/charts/highcharts_boxplot/wrapper.js @@ -0,0 +1,122 @@ +// dependencies +define(['utils/utils'], function(Utils) { + +// widget +return Backbone.View.extend( +{ + // highcharts configuration + hc_config : { + chart: { + type: 'boxplot' + }, + + title: { + text: '' + }, + + legend: { + enabled: false + }, + + credits: { + enabled: false + }, + + plotOptions: { + series: { + animation: false + } + }, + + xAxis: { + categories: [], + title: { + text: '' + } + }, + + yAxis: { + title: { + text: '' + } + }, + + series: [{ + name: 'Details:', + data: [], + tooltip: { + headerFormat: '<em>{point.key}</em><br/>' + } + }] + }, + + // initialize + initialize: function(app, options) { + this.app = app; + this.options = options; + }, + + // render + draw : function(process_id, chart, request_dictionary) + { + // configure request + var index = 0; + for (var i in request_dictionary.groups) { + var group = request_dictionary.groups[i]; + group.columns = null; + group.columns = { + x: { + index: index++ + } + } + } + + // set axis labels + this.hc_config.xAxis.title.text = chart.settings.get('x_axis_label'); + this.hc_config.yAxis.title.text = chart.settings.get('y_axis_label'); + + // request data + var self = this; + this.app.datasets.request(request_dictionary, function() { + + // reset data/categories + var data = []; + var categories = []; + + // loop through data groups + for (var key in request_dictionary.groups) { + // get group + var group = request_dictionary.groups[key]; + + // add category + categories.push(group.key); + + // format chart data + var point = []; + for (var key in group.values) { + point.push(group.values[key].x); + } + + // add to data + data.push (point); + } + + // categories + self.hc_config.xAxis.categories = categories; + + // update data + self.hc_config.series[0].data = data; + + // draw plot + self.options.canvas[0].highcharts(self.hc_config); + + // set chart state + chart.state('ok', 'Box plot drawn.'); + + // unregister process + chart.deferred.done(process_id); + }); + } +}); + +}); \ No newline at end of file diff -r 2b4c26870efbc19441f02da19659c830cc8b591a -r f05fe632cbc70d4694b5a4aa5e30b4f003952aa1 config/plugins/visualizations/charts/static/charts/nvd3_bar_stacked/config.js --- /dev/null +++ b/config/plugins/visualizations/charts/static/charts/nvd3_bar_stacked/config.js @@ -0,0 +1,8 @@ +define(['plugin/charts/nvd3/config'], function(nvd3_config) { + +return $.extend(true, {}, nvd3_config, { + title : 'Stacked', + category : 'Bar diagrams' +}); + +}); \ No newline at end of file diff -r 2b4c26870efbc19441f02da19659c830cc8b591a -r f05fe632cbc70d4694b5a4aa5e30b4f003952aa1 config/plugins/visualizations/charts/static/charts/nvd3_bar_stacked/logo.png Binary file config/plugins/visualizations/charts/static/charts/nvd3_bar_stacked/logo.png has changed diff -r 2b4c26870efbc19441f02da19659c830cc8b591a -r f05fe632cbc70d4694b5a4aa5e30b4f003952aa1 config/plugins/visualizations/charts/static/charts/nvd3_bar_stacked/wrapper.js --- /dev/null +++ b/config/plugins/visualizations/charts/static/charts/nvd3_bar_stacked/wrapper.js @@ -0,0 +1,23 @@ +// dependencies +define(['plugin/charts/nvd3/nvd3'], function(NVD3) { + +// widget +return Backbone.View.extend( +{ + // initialize + initialize: function(app, options) { + this.app = app; + this.options = options; + }, + + // render + draw : function(process_id, chart, request_dictionary) + { + var nvd3 = new NVD3(this.app, this.options); + nvd3.draw(process_id, nv.models.multiBarChart(), chart, request_dictionary, function(nvd3_model) { + nvd3_model.stacked(true); + }); + } +}); + +}); \ No newline at end of file Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.