Coder Social home page Coder Social logo

bubbleChart selection model about dc.js HOT 7 CLOSED

samsmits avatar samsmits commented on May 3, 2024
bubbleChart selection model

from dc.js.

Comments (7)

NickQiZhu avatar NickQiZhu commented on May 3, 2024

If you are binding them to the same dimension then the filtering will not affect other bubble chart, however if you create different dimension instances even though they might generated using the same logic, the filtering will treat them as separate dimensions. Let me know if that is not the case.

from dc.js.

samsmits avatar samsmits commented on May 3, 2024

That's correct, and I suppose the current behavior is to be expected.
Is there an approach I might use to optionally fade the other charts utilizing the same dimension?

from dc.js.

NickQiZhu avatar NickQiZhu commented on May 3, 2024

Yes, this is the expected behaviour from crossfilter group function. What
do you mean by fade, can you explain what you trying to do a bit?

Nick

On Thu, Aug 9, 2012 at 2:50 PM, samsmits [email protected] wrote:

That's correct, and I suppose the current behavior is to be expected.
Is there an approach I might use to optionally fade the other charts
utilizing the same dimension?


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-7623241.

from dc.js.

samsmits avatar samsmits commented on May 3, 2024

I was thinking along the lines of what the fadeDeselectedArea method accomplishes for the bubble charts.
I am reusing (minimizing overhead) a dimension in multiple charts yet render them using different parameters (they have different coordinates, parameters,etc). Selecting a node in one chart should indicate which node that is in a sibling chart.
Is there a call to the other graphs that I can tap into?

from dc.js.

NickQiZhu avatar NickQiZhu commented on May 3, 2024

Interesting idea. I think you can accomplish this by using a custom renderlet. Renderlet can be added to each of your bubble chart since every bubble selection triggers the redraw event thus calling your renderlet. I guess in the renderlet you can over write the default onclick handler on the bubbles to filter simultaneously on all three charts:

bubbleChart1.renderlet(function(chart){
    chart.selectAll("g.node circle").on("click" function(){
        bubbleChart1.filter(d.key);
        bubbleChart2.filter(d.key);
        bubbleChart3.filter(d.key);
        dc.redrawAll(chart.chartGroup());
    }) ;
});

// repeat this with other charts

I haven't tried this myself though :) Let me know if it works for your use case.

from dc.js.

samsmits avatar samsmits commented on May 3, 2024

That works perfectly, thanks!
Does renderlet override the default (eg. 'click' in this example) behavior?

from dc.js.

NickQiZhu avatar NickQiZhu commented on May 3, 2024

Yes, it does.

from dc.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.