Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brush not filtering when using composite chart #878

Closed
gramster opened this issue Mar 11, 2015 · 8 comments
Closed

Brush not filtering when using composite chart #878

gramster opened this issue Mar 11, 2015 · 8 comments
Milestone

Comments

@gramster
Copy link

Is this supposed to work?

If I create a line chart with a data table, selecting an area of the chart with the brush filters the data in the table. If I take that same line chart and wrap it in a composite chart (even if it is the only chart in the composite), the data table no longer gets filtered.

My code is the same in each case except for this:

        dcl = dc.lineChart("#dc-chart");
        dcl.dimension(dateDim)
            .group(open, "Open");

versus:

        dcl = dc.compositeChart("#dc-chart");
        dcl.compose([
                dc.lineChart(dcl)
                    .dimension(dateDim)
                    .group(open, "Open")
      ]);
@gordonwoodhull
Copy link
Contributor

This is a duplicate of, well, a lot of things.
https://github.com/dc-js/dc.js/search?q=filter+composite&type=Issues&utf8=%E2%9C%93

This branch is a start on a solution:
https://github.com/dc-js/dc.js/tree/sync-filter

Please try it out and see if it helps. Will merge to develop soon.

@jbliesener
Copy link

Any news on this one?

@Fil
Copy link
Contributor

Fil commented May 6, 2016

@joysword
Copy link

As of 2.0.0-beta32, CompositeChart's _chart._brushing() still does not trigger any redraw events. The google group link posted by Fil did not work for me.

A solution that worked for me is to simply comment out CompositeChart's _chart._brushing() function. This makes CompositeCharts use CoordinateGridMixin's _chart._brushing() for brushing, and works just fine.

@gordonwoodhull
Copy link
Contributor

Thanks @joysword, that sounds like a good workaround, as long as the dimension is the same for the composite and its children. I think we could make it possible to restore the overridden method without having to change the source.

@phsstory
Copy link

@Fil updated for 404'd external resources http://jsfiddle.net/cBgkT/42/

The redefined _chart._brushing function works if the composite graph has the defined dimension but fails if the sub-charts have defined dimensions.

@cramatt
Copy link

cramatt commented Oct 14, 2016

When I override the _chart._brushing() method I get unexpected behavior - the filtered set and brush jump around sporadically. Using 2.0.0-beta32.

daavelino added a commit to daavelino/vulnerability-catalog that referenced this issue Feb 3, 2018
…le to produce a selection over identification_dates due to this bug: dc-js/dc.js#878
@gordonwoodhull
Copy link
Contributor

Fixed by #1408 in 3.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants