Skip to content

Update to d3.js version 5.12.0#540

Merged
dajohi merged 4 commits intodecred:masterfrom
jholdstock:js-files
Sep 24, 2019
Merged

Update to d3.js version 5.12.0#540
dajohi merged 4 commits intodecred:masterfrom
jholdstock:js-files

Conversation

@jholdstock
Copy link
Copy Markdown
Member

  • Chart legend is now drawn by d3 rather than manually in the html template
  • Most of the javascript creating the charts is now in a dedicated file (good progress towards eliminate all inline javascript #532)
  • Chart labels are now showing absolute values rather than percentages. This is because percentages are quite easy to estimate by looking at the size of the pie slices, but it is not possible to work out the absolute values.

Closes #533

@jholdstock
Copy link
Copy Markdown
Member Author

Requesting review from @chappjc

@chappjc
Copy link
Copy Markdown
Member

chappjc commented Sep 23, 2019

A big benefit of the newer d3 versions is the ability to pick and choose the modules you need. You've opted for the default package, which includes everything, so that works but it's much bigger than needed.

See https://github.com/d3/d3/blob/master/API.md.
I think we'd just need d3-path, d3-selection, d3-scale (and it's deps except the time ones), and d3-shape.

@jholdstock
Copy link
Copy Markdown
Member Author

Done. Previously 1 file at 246kB, now 9 files at 91kB

- Chart legend is now drawn by d3 rather than manually in the html template
- Most of the javascript creating the charts is now in a dedicated file (good progress towards decred#532)
- Chart labels are now showing absolute values rather than percentages. This is because percentages are quite easy to estimate by looking at the size of the pie slices, but it is not possible to work out the absolute values.

Closes decred#533
@dajohi dajohi merged commit c692b11 into decred:master Sep 24, 2019
jyap808 pushed a commit to ubiq/dcrstakepool that referenced this pull request Dec 16, 2019
ljk662 pushed a commit to bisontrails/dcrstakepool that referenced this pull request Mar 4, 2020
ljk662 pushed a commit to bisontrails/dcrstakepool that referenced this pull request Mar 4, 2020
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

Successfully merging this pull request may close these issues.

update to modular d3 (and compatible d3pie)

3 participants