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

replace unnecessary jQuery with vanilla JavaScript #91

Open
cjyetman opened this issue Jul 18, 2024 · 0 comments
Open

replace unnecessary jQuery with vanilla JavaScript #91

cjyetman opened this issue Jul 18, 2024 · 0 comments

Comments

@cjyetman
Copy link
Member

There are a sprinkling of jQuery specific commands that could easily be replaced with vanilla JavaScript, reducing/eliminating the dependency on jQuery, e.g.

https://github.com/search?q=repo%3ARMI-PACTA%2Fpacta.portfolio.report+%24.&type=code

For example, this...

$.each(legend_data, function(index,item) {
legend_data[index]["sector_shift"] = unique_sectors.indexOf(item.ald_sector_translation);
})

could be replaced by...

legend_data.forEach((item) => { item["sector_shift"] = unique_sectors.indexOf(item.ald_sector_translation) });

as was done in RMI-PACTA/pacta.interactive.plot#49

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

1 participant