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

Is DC v4 compatible with D3 v7? #1882

Open
JG-QuarkNet opened this issue Sep 20, 2023 · 4 comments
Open

Is DC v4 compatible with D3 v7? #1882

JG-QuarkNet opened this issue Sep 20, 2023 · 4 comments

Comments

@JG-QuarkNet
Copy link

I'm trying to update a webapp that uses DC.js, D3.js, and Crossfilter to use all currently-supported versions of these libraries.

When I test using the following versions

dc.js          4.0.0
dc CSS         3.0.3
d3.js          7.8.5
Crossfilter    1.5.4

the graphs misbehave and the console logs the error

Uncaught TypeError: r.event is undefined
    _brushing coordinate-grid-mixin.js:978
    renderBrush coordinate-grid-mixin.js:935
    call d3-7.8.5.min.js:2
    emit d3-7.8.5.min.js:2
    start d3-7.8.5.min.js:2
    move d3-7.8.5.min.js:2
    each d3-7.8.5.min.js:2
    move d3-7.8.5.min.js:2
    call d3-7.8.5.min.js:2
    redrawBrush coordinate-grid-mixin.js:1028
    renderBrush coordinate-grid-mixin.js:946
    _drawChart coordinate-grid-mixin.js:1149
    _doRender coordinate-grid-mixin.js:1114
    render base-mixin.js:657
    render bar-chart.js:78
    <anonymous> (index):816
    jQuery 8
    <anonymous> (index):728
    jQuery 8

The root of the error stack is attributed to coordinate-grid-mixin.js:978:13, which only exists on this system as a reference within the DC v4 map file dc-4.0.0.min.js.map.

I'm guessing that r.event refers to d3.event, which was removed in D3 v6, and that DC hasn't yet been updated to reflect its removal. Is that the case, and if so, have you determined what the highest version of D3 is that DC v4 is compatible with? I've looked through the issues here and found lots of discussion about D3 and DC versions, but I couldn't find a clear statement of the bottom line.

Thanks for your work on the library.

@caracal7
Copy link

caracal7 commented Nov 23, 2023

dc.js 5.0.0 alpha is working for me with d3 7.8.5 without any issues

@gordonwoodhull
Copy link
Contributor

gordonwoodhull commented Nov 30, 2023

Since D3 and dc.js are both evolving, the best way to answer this sort of question is to look at the package.json for the version of dc.js you are using

dc.js 4.0.0 is compatible with d3 5.15

"d3": "^5.15.0"

dc.js 4.2.7 is compatible with d3 6.6.2

According to the changelog, version 4.1 and above is compatible with d3 6.* while remaining compatible with 5.*

"d3": "^6.6.2"

Deepak has taken over as of dc.js 5.* - looks like the latest on dc-v5 branch is compatible with d3 7.1.1

"d3": "^7.1.1"

@JG-QuarkNet
Copy link
Author

Thanks for the info! Do you know if there's going to be a stable release of 4.27 or anything on 5.*?

@gordonwoodhull
Copy link
Contributor

4.2.7 is a stable release - up through 4.* we followed continuous integration and a scaled-down variant of semantic versioning.

@kum-deepak introduced a lot of breaking changes in 5.*, and for good reason. He has cleaned things up quite a bit.

Maybe he can answer how stable the dc-v5 branch is.

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

3 participants