Charts: Fix jqplot bar axis

This commit is contained in:
Aysam Guerler
2014-06-18 06:42:11 -04:00
parent a1d0241e4e
commit 3d29155a80
4 changed files with 12 additions and 5 deletions
@@ -20,7 +20,12 @@ return Backbone.View.extend(
makeConfig : function(groups, plot_config){
$.extend(true, plot_config, {
seriesDefaults: {
renderer : $.jqplot.BarRenderer
renderer : $.jqplot.BarRenderer
},
axes: {
xaxis: {
min : -1
}
}
});
}
@@ -16,8 +16,8 @@ return function(chart) {
showLine : true, // whether to render the line segments or not.
rendererOptions: {
shadowDepth : 0,
//barDirection : 'horizontal',
barWidth : 1
barWidth : 3,
barPadding : 3
},
markerRenderer : $.jqplot.MarkerRenderer,
markerOptions: {
@@ -56,7 +56,6 @@ return function(chart) {
angle : chart.settings.get('use_panels') === 'true' ? 0 : -30,
showGridline : chart.settings.get('x_axis_grid') === 'true'
},
tickInterval : 1,
pad : 0
},
yaxis: {
@@ -134,7 +134,7 @@ return Backbone.View.extend(
formatter : function(formatter) {
if (formatter) {
plot_config.axes[id + 'axis'].tickOptions.formatter = function(format, value) {
return formatter(value);
return formatter(value);
};
}
}
@@ -361,6 +361,9 @@ function addZoom(options) {
// add handler
svg.call(d3zoom).on('dblclick.zoom', unzoomed);
// return
return d3zoom;
};
// return