-->

dc.js elasticY range bound by brush y values

2019-07-25 04:05发布

问题:

How can we control the elasticY recalculation of the Y axis range, on a scatter plot, to be bound by the brushes Y range? Thus if a scatter plot has a brush bounded on the Y axis between [6-8) and the elasticY recalculates the new Y axis range to be [3-7] we would like the new Y axis range to be [3-8], because if it used 7 the top part of the brush would be off the screen.

.elasticY(true)

A jsfiddle example.

  1. Brush the 1st scatter plot x=8, y=[6,9) "Around the two dots". Everything looks good.
  2. Brush the 2nd scatter plot y=8, z=12 (Around the single dot). The brush on scatter plot #1 is out of bounds.

We would like to restrict the Y axis on scatter plot #1 so the brush is still in bounds. Is there a straight forward way to do this or an override?

Actually our scatterPlots only use a yAxis brush.