composite charts : axes out of sync

已查看 17 次
跳至第一个未读帖子

Frozenlock

未读,
2017年10月31日 07:15:412017/10/31
收件人 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

未读,
2017年11月1日 05:51:132017/11/1
收件人 dc-js user group
Ok I think I found what is wrong : 




Gordon Woodhull

未读,
2017年11月1日 08:58:012017/11/1
收件人 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

未读,
2017年11月1日 12:24:192017/11/1
收件人 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.
回复全部
回复作者
转发
0 个新帖子