composite charts : axes out of sync

17 views
Skip to first unread message

Frozenlock

unread,
Oct 31, 2017, 7:15:41 AM10/31/17
to dc-js user group

Hello,

I've successfully charted some subsets of the dataset using fake groups. 

(From a previous discussion : https://groups.google.com/forum/#!topic/dc-js-user-group/sG-uvnSIC5E)


I have a little problem with my axes however...

Everything looks fine until I apply a filter.

At this point, each subchart creates its own axes (both X and Y) and becomes de-synchronized from the composite chart.

Worse, it messes with the ability to resize the chart by setting the width/height and calling rescale.


Does anyone know what might be causing this?

Even having a ballpark of where to look would very appreciated.



Some characteristics:

Each fake group use the same dimension and the same value accessor.

I maintain the dc registry manually. (Charts are removed and placed into a custom group using lifecycle events.)



And this might be of interest:

I had to set the colors manually; the composite chart was giving every subchart the same color.


The following gif shows

1. Successful resizing with axes kept in sync;

2. Filtering another chart;

3. Axes desynced;

4. Can't resize anymore.


Thank you very much in advance!



Frozenlock

unread,
Nov 1, 2017, 5:51:13 AM11/1/17
to dc-js user group
Ok I think I found what is wrong : 




Gordon Woodhull

unread,
Nov 1, 2017, 8:58:01 AM11/1/17
to dc-js-us...@googlegroups.com
Right, ordinarily registration happens automatically, and that code you linked ensures that child charts just take some properties from the composite chart and don't try to register themselves.

Did you create the child charts separately and then try to join them using a composite, or manually register them, or something? 

That does sound like bizarre behavior.



On Nov 1, 2017, at 5:51 AM, Frozenlock <froze...@gmail.com> wrote:

Ok I think I found what is wrong : 




--
You received this message because you are subscribed to the Google Groups "dc-js user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dc-js-user-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dc-js-user-group/70b5ffde-40c2-481f-93e8-efd0e92b8cd4%40googlegroups.com.

Frozenlock

unread,
Nov 1, 2017, 12:24:19 PM11/1/17
to dc-js user group
Yes, like I wrote in the original post I'm currently registering the charts manually.
Hopefully I'll reverse to using the original DC behavior soon.
Reply all
Reply to author
Forward
0 new messages