问题
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