dc.js rowChart - make entire row clickable?

守給你的承諾、 提交于 2019-12-08 10:40:14

问题


I've got a dc.js rowChart (using the current stable release). It's beautiful. I need it to be more touch-friendly though.

In particular, rows with small values have very tiny bars and are very hard to tap. What I'd like to do it make it such that the user can click anywhere on a row to select/deselect that row rather than having to click directly on the bar.

Is this possible?


回答1:


As a very hacky solution, I was able to add a bunch of non-breaking spaces after the label and get this effect:

.label(function (d) { return /* your label here */ + new Array(100).join('\xa0'); })

(An invisible element would be better.)



来源:https://stackoverflow.com/questions/30552987/dc-js-rowchart-make-entire-row-clickable

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