dc-js禁用在饼图上单击时选择切片

roo*_*tar 2 javascript d3.js crossfilter dc.js

我正在为饼图寻找条形图brushOn(假)模拟.

此代码对我不起作用:

  chart.renderlet (_chart) ->
    _chart.selectAll(".pie-slice").on "click", (d) ->
      _chart.filter null
Run Code Online (Sandbox Code Playgroud)

我的dc-js版本是2.0

DJ *_*tin 7

根据https://groups.google.com/forum/#!msg/dc-js-user-group/Fxg4vykNSqI/hgdj2PEomHsJ:

pieChart.filter = function() {};
Run Code Online (Sandbox Code Playgroud)

我在http://jsfiddle.net/djmartin_umich/3chM6/尝试了这个,它似乎按照需要工作.

  • 或者,`chart.onClick = function(){};` (3认同)