Hello, I'm a Purescript newbie, trying to rewrite some D3 snippets. I'm currently working on Arc and Pie chart examples, so I've added some wrappers for them in my fork. However, while transcribing http://bl.ocks.org/mbostock/3888852, I've ran into trouble with this part:
svg.selectAll(".arc")
.data(function(d) { return pie(d.ages); })
.enter().append("path")
.attr("class", "arc")
.attr("d", arc)
.style("fill", function(d) { return color(d.data.name); });
If I understand correctly, here we need something like bindData' :: forall oldData newData. (oldData -> newData) -> Selection oldData -> D3Eff (Update newData). However, selectAll always gives us Selection Void, not allowing to modify previously bound data. Can this type signature be made more elaborate?
Hello, I'm a Purescript newbie, trying to rewrite some D3 snippets. I'm currently working on Arc and Pie chart examples, so I've added some wrappers for them in my fork. However, while transcribing http://bl.ocks.org/mbostock/3888852, I've ran into trouble with this part:
If I understand correctly, here we need something like
bindData' :: forall oldData newData. (oldData -> newData) -> Selection oldData -> D3Eff (Update newData). However,selectAllalways gives usSelection Void, not allowing to modify previously bound data. Can this type signature be made more elaborate?