IQSS / dataverse-metrics

Aggregate and visualize metrics for installations of Dataverse around the world
https://dataverse.org/metrics
Apache License 2.0
8 stars 9 forks source link

Use d3plus v2.0 #69

Open qqmyers opened 2 years ago

qqmyers commented 2 years ago

It looks like d3plus 2.0 was released last February. Since v1.x is now obsolete, we should upgrade. I did a couple quick checks and there are some basic changes such as the d3plus.viz() method being replaced with the need to construct a new object - 'new d3plus.Viz()' as well as changes to how containers are specified. It's possible that the changes will only mean changing a few lines of code, but I didn't have time to investigate fully.

So - adding a placeholder issue. If anyone else is able to pick this up, please feel free. I'm happy to help and/or adapt the solution for the newmetrics branch if that's not merged yet.

donsizemore commented 2 years ago

Indeed, D3plus is now returning 404s:

ailed to load resource: the server responded with a status of 404 ()
d3.js:1 Failed to load resource: the server responded with a status of 404 ()
d3plus.js:1 Failed to load resource: the server responded with a status of 404 ()
plots.js:18 Uncaught ReferenceError: d3 is not defined
    at dataversesToMonth (plots.js:18)
    at plots.js:4
    at XMLHttpRequest.xobj.onreadystatechange (contributors.js:38)

Since I can't simply bump the version we call, I'll ... respond to the user list for now.

qqmyers commented 2 years ago

@donsizemore - FYI: the commit I made to the newmetrics branch is all that is needed to fix the 404s - I made the change in the branch, but you can change the same lines and add local copies of the two d3 files to the base branch in the same way. This issue was just for the longer term upgrade to 2.0.

rawidiyaningrum commented 2 years ago

I'm waiting for the solution, i met this issue, too .. should i use local copy of d3plus?

rawidiyaningrum commented 2 years ago

solved from Issue #68

thank you