VOOZH about

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

⇱ D3.js quadraticCurveTo() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

D3.js quadraticCurveTo() Function

Last Updated : 9 Aug, 2020

The d3.path.quadraticCurveTo() function is used to draw the quadratic bezier segment to a certain point from the current points via certain control points.

Syntax:

path.quadraticCurveTo(cpx, cpy, x, y)

Parameters: It takes  four parameters as given above and described below.

  • cpx: It is the x-coordinate of the quadratic control point.
  • cpy: It is the y-coordinate of the quadratic control point.
  • x: It is the x-coordinate of the ending point.
  • y: It is the y-coordinate of the ending point.

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment
Article Tags: