Skip to content

Commit

Permalink
More config clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 19, 2016
1 parent b23b18c commit 183cbec
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 94 deletions.
@@ -1,20 +1,18 @@
define(['plugin/charts/jqplot/common/config'], function(plot_config) {

return $.extend(true, {}, plot_config, {
title : 'Regular',
category : 'Bar diagrams',
columns : {
x : {
title : 'Values for x-axis',
is_label : true,
is_auto : true,
is_unique : true
},
y : {
title : 'Values for y-axis',
is_numeric : true
define( [ 'plugin/charts/jqplot/common/config' ], function( plot_config) {
return $.extend( true, {}, plot_config, {
title : 'Regular',
category : 'Bar diagrams',
columns : {
x : {
title : 'Values for x-axis',
is_label : true,
is_auto : true,
is_unique : true
},
y : {
title : 'Values for y-axis',
is_numeric : true
}
}
}
});

});
});
@@ -1,16 +1,14 @@
define(['plugin/charts/jqplot/common/config'], function(default_config) {

return $.extend(true, {}, default_config, {
title : 'Discrete Histogram',
category : 'Data processing (requires \'charts\' tool from Toolshed)',
execute : 'histogramdiscrete',
keywords : 'small medium large',
columns : {
x : {
title : 'Observations',
is_label : true
define( [ 'plugin/charts/jqplot/common/config' ], function( default_config ) {
return $.extend( true, {}, default_config, {
title : 'Discrete Histogram',
category : 'Data processing (requires \'charts\' tool from Toolshed)',
execute : 'histogramdiscrete',
keywords : 'small medium large',
columns : {
x : {
title : 'Observations',
is_label : true
}
}
}
});

});
});
@@ -1,20 +1,18 @@
define(['plugin/charts/jqplot/common/config'], function(plot_config) {

return $.extend(true, {}, plot_config, {
title : 'Line chart',
category : 'Others',
columns : {
x : {
title : 'Values for x-axis',
is_label : true,
is_auto : true,
is_unique : true
},
y : {
title : 'Values for y-axis',
is_numeric : true
define( [ 'plugin/charts/jqplot/common/config' ], function( plot_config ) {
return $.extend( true, {}, plot_config, {
title : 'Line chart',
category : 'Others',
columns : {
x : {
title : 'Values for x-axis',
is_label : true,
is_auto : true,
is_unique : true
},
y : {
title : 'Values for y-axis',
is_numeric : true
}
}
}
});

});
});
@@ -1,4 +1,4 @@
define(['plugin/charts/nvd3/common/config'], function(nvd3_config) {
define( [ 'plugin/charts/nvd3/common/config' ], function( nvd3_config ) {
return $.extend(true, {}, nvd3_config, {
title : 'Regular',
category : 'Bar diagrams',
Expand Down
@@ -1,10 +1,7 @@
define( [ 'plugin/charts/nvd3/common/config', 'plugin/charts/forms/inputs' ], function( nvd3_config, Inputs ) {
define( [ 'plugin/charts/nvd3/common/config' ], function( nvd3_config ) {
return $.extend( true, {}, nvd3_config, {
title : 'Horizontal',
category : 'Bar diagrams',
settings : {
x_axis_type : Inputs.axisType( 'x_axis_type', { value: 'hide' } )
},
columns : {
x : {
title : 'Values for x-axis',
Expand Down
@@ -1,10 +1,7 @@
define( [ 'plugin/charts/nvd3/common/config', 'plugin/charts/forms/inputs' ], function( nvd3_config, Inputs ) {
define( [ 'plugin/charts/nvd3/common/config' ], function( nvd3_config ) {
return $.extend( true, {}, nvd3_config, {
title : 'Stacked horizontal',
category : 'Bar diagrams',
settings : {
x_axis_type : Inputs.axisType( 'x_axis_type', { value: 'hide' } )
},
columns : {
x : {
title : 'Values for x-axis',
Expand Down
@@ -1,20 +1,18 @@
define(['plugin/charts/nvd3/common/config'], function(nvd3_config) {

return $.extend(true, {}, nvd3_config, {
title : 'Stacked',
category : 'Bar diagrams',
columns : {
x : {
title : 'Values for x-axis',
is_label : true,
is_auto : true,
is_unique : true
},
y : {
title : 'Values for y-axis',
is_numeric : true
define( [ 'plugin/charts/nvd3/common/config' ], function( nvd3_config ) {
return $.extend( true, {}, nvd3_config, {
title : 'Stacked',
category : 'Bar diagrams',
columns : {
x : {
title : 'Values for x-axis',
is_label : true,
is_auto : true,
is_unique : true
},
y : {
title : 'Values for y-axis',
is_numeric : true
}
}
}
});

});
});
@@ -1,5 +1,5 @@
define( [ 'plugin/charts/forms/default', 'plugin/plugins/nvd3/nv.d3' ], function( config_default ) {
return $.extend( true, {}, config_default, {
define( [ 'plugin/charts/forms/default', 'plugin/plugins/nvd3/nv.d3' ], function( default_config ) {
return $.extend( true, {}, default_config, {
title : '',
category : '',
library : 'NVD3',
Expand Down
@@ -1,5 +1,5 @@
define( [ 'plugin/charts/forms/default', 'plugin/charts/forms/inputs' ], function( default_config, Inputs ) {
return $.extend( true, {}, default_config, {
define( [ 'plugin/charts/nvd3/common/config' ], function( nvd3_config ) {
return $.extend( true, {}, nvd3_config, {
library : 'NVD3',
tag : 'svg',
title : 'Histogram',
Expand All @@ -11,11 +11,6 @@ define( [ 'plugin/charts/forms/default', 'plugin/charts/forms/inputs' ], functio
title : 'Observations',
is_numeric : true
}
},
settings : {
x_axis_label : Inputs.axisLabel( 'x_axis_label', { value: 'Values' } ),
y_axis_label : Inputs.axisLabel( 'y_axis_label', { value: 'Density' } ),
y_axis_type : Inputs.axisType( 'y_axis_type', { value: 'f', precision: '2' } )
}
});
});
@@ -1,5 +1,5 @@
define( [ 'plugin/charts/forms/default', 'plugin/charts/forms/inputs' ], function( default_config, Inputs ) {
return $.extend(true, {}, default_config, {
define( [ 'plugin/charts/nvd3/common/config' ], function( nvd3_config ) {
return $.extend(true, {}, nvd3_config, {
library : 'NVD3',
tag : 'svg',
title : 'Discrete Histogram',
Expand All @@ -11,11 +11,6 @@ define( [ 'plugin/charts/forms/default', 'plugin/charts/forms/inputs' ], functio
title : 'Observations',
is_label : true
}
},
settings : {
x_axis_label : Inputs.axisLabel( 'x_axis_label', { value: 'Breaks' } ),
y_axis_label : Inputs.axisLabel( 'y_axis_label', { value: 'Density' } ),
y_axis_type : Inputs.axisType( 'y_axis_type', { value: 'f', precision: '2' } )
}
});
});
@@ -1,5 +1,5 @@
define( [ 'plugin/charts/nvd3/common/config' ], function( nvd3_config ) {
return $.extend(true, {}, {
return $.extend( true, {}, {
title : 'Pie chart',
category : 'Area charts',
library : 'NVD3',
Expand Down

0 comments on commit 183cbec

Please sign in to comment.