D3-graph-gallery
D3-graph-gallery copied to clipboard
Use d3 with rails 6
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
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.