Skip to content

Commit

Permalink
Always update bar sizes on render
Browse files Browse the repository at this point in the history
  • Loading branch information
mtraynham committed Mar 26, 2015
1 parent 42b480e commit 77b3fc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/coordinate-grid-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ dc.coordinateGridMixin = function (_chart) {
return groups.map(_chart.keyAccessor());
};

function prepareXAxis(g) {
function prepareXAxis(g, render) {
if (!_chart.isOrdinal()) {
if (_chart.elasticX()) {
_x.domain([_chart.xAxisMin(), _chart.xAxisMax()]);
Expand All @@ -393,7 +393,7 @@ dc.coordinateGridMixin = function (_chart) {

// has the domain changed?
var xdom = _x.domain();
if (!_lastXDomain || _lastXDomain.length !== xdom.length ||
if (render || !_lastXDomain || _lastXDomain.length !== xdom.length ||
xdom.some(function (elem, i) { return elem !== _lastXDomain[i]; })) {
_chart.rescale();
}
Expand Down Expand Up @@ -1001,7 +1001,7 @@ dc.coordinateGridMixin = function (_chart) {
_brushOn = false;
}

prepareXAxis(_chart.g());
prepareXAxis(_chart.g(), render);
_chart._prepareYAxis(_chart.g());

_chart.plotData();
Expand Down

0 comments on commit 77b3fc3

Please sign in to comment.