I am trying to understand a JavaScript code.
Please find the whole code on this codepen website.
I cannot determine where the variable d3 is defined.
This variable is used in many places in the code, for example in let svg = d3.select('.chart-wrapper').append('svg').
Could someone please tell me where this variable comes from?
>Solution :
The global object of the D3.js library is d3.
D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.
- Click the "Settings" icon to see the JavaScript settings in CodePen.
- Check the "Add External Scripts/Pens" field to see the CDN references added to the project.

