Facing issue while trying to integrate D3.

0
Facing issue while trying to integrate D3. Version of Mendix:7.23.7 Widget name:Tech Tammina D3 Charts We are trying to integrate forced connected graph using D3.But getting below error. Error while evaluating javascript input: TypeError: d3.layout.force(...).size(...).nodes(...).links(...).on(...).lineDistance is not a function
asked
2 answers
4

Hello Govarthini Rajan,

Have you added the script file into your project directory inside theme and added a script call inside index.html, Because it seems the method not defined. You can add the method in two ways,

  1. Adding the script tag inside index.html file like,  <script src="https://d3js.org/d3.v5.min.js"></script>
  2. Add the folder ‘scripts’ inside the theme folder of your project directory, add d3.v5.min.js into ‘scripts’ folder then add the following inside index.html file  <script rel="preload" src="scripts/d3.v5.min.js"></script>

You can add the version based on your feasibility, I gave the sample for version 5 

Hope this helps, Thanks!

answered
0

Are you able to see more detailed information in the Java Script Console of your browser?

answered