dc.js elasticY range bound by brush y values

▼魔方 西西 提交于 2019-12-11 09:28:46

问题


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.

来源:https://stackoverflow.com/questions/48079293/dc-js-elasticy-range-bound-by-brush-y-values

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!