VOOZH about

URL: https://www.geeksforgeeks.org/javascript/d3-js-path-moveto-function/

⇱ D3.js | Path.moveTo() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

D3.js | Path.moveTo() Function

Last Updated : 11 Apr, 2022

D3.js is mostly used for making of graph and visualizing data on the HTML svg elements. D3 somehow is related to Data Driven Documents. The Path.moveTo() function is used to move a point inside the svg element. This library is also capable enough to draw simulations, 2D graphs and 3D graphs and used for producing dynamic, interactive data visualizations. It makes use of Scalable Vector Graphics i.e SVG elements. This library mostly works with svg vectors. 

Syntax:

Path.moveTo(x,y)

Parameters: This function accepts two parameter as mentioned above and described below:

  • X: This parameter the x-position of the element.
  • Y: This parameter the y-position of the element.

Below example illustrate the Path.moveTo() function in D3.js:

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image

Comment
Article Tags: