Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
How to create chart using JS. D3 library.
Rating: 4.2 out of 5(6 ratings)
1,009 students

How to create chart using JS. D3 library.

Mini free course regarding a simple but usefull javascript library to build charts.
Created byPaolo Capra
Last updated 1/2025
English

What you'll learn

  • Creating charts usingJS
  • Understanding the use of a JS library
  • Working with d3 built in functions.
  • Manage front-end concepts.

Course content

1 section10 lectures29m total length
  • What is D3 library.0:59

    Learn how D3, an open source JavaScript library, helps you create data visualizations by manipulating DOM elements with HTML, CSS, and SVG.

  • Selection and Manipulation.3:33

    Master selecting and manipulating DOM elements with the D3 library using select and select all, then chain methods to style, set attributes, and append or update text.

  • Data binding and loading.1:59

    Bind a five-element dataset to the page by selecting all paragraphs, using the data method, and using the enter method to append five paragraphs with custom text.

  • Creating a Bar Chart.5:36

    Create a bar chart with d3 by configuring width, height, and margins, creating an svg group, binding data, entering rectangles, and translating bars with transform to fit the chart.

  • Attaching Labels to the Bar Chart.2:56

    Attach labels to bars in a D3 bar chart by appending SVG text for each data item, computing x and y from bar dimensions, and offsetting above the bars.

  • Using the ScaleLinear() function.3:05

    Use the d3 scaleLinear to scale chart bars by computing domain from zero to the data max and mapping to the chart height, ensuring proportional bars and adjustable range.

  • Creating the x and y axes.2:24

    Learn to create x and y axes in D3 using built-in axis and scale functions. Position axis groups in an SVG with transforms to display the axes as intended.

  • Manipulate an svg.3:41

    Manipulate an SVG with the D3 library by selecting the SVG, setting width and height, and appending a line, rectangle, and circle with proper stroke and fill attributes.

  • Creating a pie chart.3:21

    Create a pie chart with D3 by defining width, height, and radius, centering a group in svg, and applying the pie and arc functions with color scale for three slices.

  • Final suggestions.2:07

    Explore final suggestions for displaying fetched api data in a line chart using the d3 library, including fetch requests, api configurations, and choosing public finance or cryptocurrency apis.

Requirements

  • Javascript , HTML , CSS

Description

This course introduces the basic function that we can make use to create charts . They could be bar chart , pie chart , it could even be something different like manipulating svg . I think this library can be very useful to data analyst as well as web developer.

In this 30-minute course, you'll dive into the fundamentals of D3.js, a powerful JavaScript library for creating interactive, data-driven visualizations. Designed for both beginners and intermediate developers, this course covers key concepts and functions within D3 to help you bring your data to life on the web. Starting with the basics, you'll learn how to set up a D3 environment and explore its core functionalities, such as selecting elements, binding data, and creating simple SVG shapes.

Throughout the course, you'll gain hands-on experience with D3’s data-driven approach, and discover how to manipulate the DOM (Document Object Model) to generate dynamic visualizations like bar charts, line graphs, and scatter plots. You'll also explore how to incorporate transitions and animations to create engaging, interactive elements that respond to user input.

By the end of the course, you’ll have the confidence to start building your own custom visualizations and understand the underlying principles behind D3’s data-binding and rendering techniques. Whether you're working on personal projects or professional dashboards, this course will empower you to unlock the full potential of D3.js and create visually compelling, data-driven applications.

Who this course is for:

  • Front-end developer.
  • Full-stack developer.
  • Designers.