Skip to content

Commit 551fdeb

Browse files
enable elasticX only for render, if mouseZoomable or focusChart
toward #1623, #987
1 parent 5bc89de commit 551fdeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/coordinate-grid-mixin.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ dc.coordinateGridMixin = function (_chart) {
479479

480480
function prepareXAxis (g, render) {
481481
if (!_chart.isOrdinal()) {
482-
if (_chart.elasticX()) {
482+
if (_chart.elasticX() && (render || (!_chart.mouseZoomable() && !_rangeChart))) {
483483
_x.domain([_chart.xAxisMin(), _chart.xAxisMax()]);
484484
}
485485
} else { // _chart.isOrdinal()
@@ -1236,7 +1236,7 @@ dc.coordinateGridMixin = function (_chart) {
12361236

12371237
_chart.plotData();
12381238

1239-
if (_chart.elasticX() || _resizing || render) {
1239+
if (_chart.elasticX() && (!_chart.mouseZoomable() && !_rangeChart) || _resizing || render) {
12401240
_chart.renderXAxis(_chart.g());
12411241
}
12421242

0 commit comments

Comments
 (0)