angular-dc icon indicating copy to clipboard operation
angular-dc copied to clipboard

how to properly refresh crossfilter dataset and render d3 piechart

Open sallespro opened this issue 10 years ago • 8 comments

i would like refresh crossfilter dataset and render the chart once in a while.

the crossfilter is initialized and after some new data arrives, i tried to

          ndx.remove();
          ndx = crossfilter(new_dataset);

plus redefine dimensions & groups...

and then

dc.renderAll(1);

but it doesn't seem to reset crossfilter, but i can see the chart redraw.

what's the proper way to do it ?

sallespro avatar Jul 29 '14 18:07 sallespro

@sallespro I am having a bit of trouble replicating this, could you possible put together a jsfiddle or codepen?

TomNeyland avatar Sep 12 '14 19:09 TomNeyland

hey @TomNeyland, yes, i'll do so.

AFAIK the directive would be hindering the rendering ( drawing ) with the new dataset, despite crossfilter is in fact updated.

i thought i should do it without the angular directive instead, or does it occur to you a way with the directive ?

sallespro avatar Sep 12 '14 20:09 sallespro

I wanted to do the same issue . crossfilter is initialized with new data as new data comes. The corssfilter and the dimension are updated in $scope. But the charts are not redrawn with the new crossfilter values

How to explicitly redraw the charts

deebuls avatar Feb 03 '15 13:02 deebuls

I am going look into this the next time I have a chance to go through knocking out issues.

@deebuls @sallespro would you be able to put together at JSFiddle that demonstrates the problem? It would aid me in understanding and resolving this quicker.

TomNeyland avatar Feb 03 '15 23:02 TomNeyland

I struggled here too. Any news on this?

@deebuls @sallespro Have you found any appropriate workaround in the meantime?

kenda avatar May 26 '15 11:05 kenda

Was a JSFiddle submitted for this or was the issue resolved? Also running into trouble refreshing pie charts after updating crossfilter values.

Happy to put together a Fiddle if needed.

toddlamothe avatar Sep 11 '15 20:09 toddlamothe

@toddlamothe I'd love if you could put a fiddle together.

I am traveling until 9/18 so my ability to look into this before then is limited, but having a fiddle will help me greatly when I get back.

TomNeyland avatar Sep 12 '15 20:09 TomNeyland

having trouble with the jsfiddle. code is there but the pie chart won't render:

https://jsfiddle.net/lamothe/z1c07pha/13/

toddlamothe avatar Sep 14 '15 02:09 toddlamothe