From 4b1737655001f0e0cedfd3832ff0f75b360aac6b Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Sat, 16 Jul 2016 23:34:47 -0400 Subject: [PATCH] don't enforce #667, extents including zero, again --- src/composite-chart.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/composite-chart.js b/src/composite-chart.js index a262cbaa1..261fb1996 100644 --- a/src/composite-chart.js +++ b/src/composite-chart.js @@ -130,18 +130,14 @@ dc.compositeChart = function (parent, chartGroup) { } function alignYAxisRanges (lyAxisMin, lyAxisMax, ryAxisMin, ryAxisMax) { - // make sure both ranges include zero (or there's nothing to align) - // this is already true due to the stack mixin (#667) - lyAxisMin = Math.min(lyAxisMin, 0); - ryAxisMin = Math.min(ryAxisMin, 0); - lyAxisMax = Math.max(lyAxisMax, 0); - ryAxisMax = Math.max(ryAxisMax, 0); - // since the two series will share a zero, each Y is just a multiple // of the other. and the ratio should be the ratio of the ranges of the // input data, so that they come out the same height. so we just min/max + + // note: both ranges already include zero due to the stack mixin (#667) // if #667 changes, we can reconsider whether we want data height or - // height from zero to be equal. + // height from zero to be equal. and it will be possible for the axes + // to be aligned but not visible. var extentRatio = (ryAxisMax - ryAxisMin) / (lyAxisMax - lyAxisMin); return {