Skip to content

Commit

Permalink
enable elasticX only for render, if mouseZoomable or focusChart
Browse files Browse the repository at this point in the history
toward #1623, #987
  • Loading branch information
gordonwoodhull committed Dec 13, 2019
1 parent 5bc89de commit 551fdeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coordinate-grid-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ dc.coordinateGridMixin = function (_chart) {

function prepareXAxis (g, render) {
if (!_chart.isOrdinal()) {
if (_chart.elasticX()) {
if (_chart.elasticX() && (render || (!_chart.mouseZoomable() && !_rangeChart))) {
_x.domain([_chart.xAxisMin(), _chart.xAxisMax()]);
}
} else { // _chart.isOrdinal()
Expand Down Expand Up @@ -1236,7 +1236,7 @@ dc.coordinateGridMixin = function (_chart) {

_chart.plotData();

if (_chart.elasticX() || _resizing || render) {
if (_chart.elasticX() && (!_chart.mouseZoomable() && !_rangeChart) || _resizing || render) {
_chart.renderXAxis(_chart.g());
}

Expand Down

0 comments on commit 551fdeb

Please sign in to comment.