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

Use d3 with rails 6 #70

Open
NehaPeer opened this issue Nov 19, 2021 · 0 comments
Open

Use d3 with rails 6 #70

NehaPeer opened this issue Nov 19, 2021 · 0 comments

Comments

@NehaPeer
Copy link

Using ruby 2.7.3 Rails 6.1.3

I am using d3 but it throws the below error on console -

TypeError: setting getter-only property "format" using
Ie https://d3js.org/d3.v4.min.js:2
https://d3js.org/d3.v4.min.js:2
https://d3js.org/d3.v4.min.js:2
https://d3js.org/d3.v4.min.js:2

On the view page, I have added the below code -

<script src="https://d3js.org/d3.v4.min.js">
</script>
<%= javascript_pack_tag "home/index" %>*

Below line added app/javascript/packs/application.js -

import * as d3 from "d3"
window.d3 = d3

Please give suggestions on these.

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