VOOZH about

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

⇱ D3.js path.toString() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

D3.js path.toString() Function

Last Updated : 7 Aug, 2020

The path.toString() function in d3.js is used to return the string representation of the path of the shape drawn. The path representation is according to the SVG's path data specification.

Syntax:

path.toString() 

Parameters: This function does not accept any parameters.

Return Value: This function returns a string.

Example 1:

Output: Path string for this shape is given in console.

👁 Image

Example 2:

Output: The path string for the square shape is given in the console.

👁 Image
Comment
Article Tags: