figma_create_path
Create vector paths from coordinate points for charts, curves, and shapes. Supports straight lines and smooth Catmull-Rom curves.
Instructions
Create a vector path from points. Much simpler than create_from_svg for charts, curves, and shapes. Supports straight lines and smooth (Catmull-Rom) curves.
Examples:
Line chart: points=[{x:0,y:80},{x:50,y:20},{x:100,y:60}], curveType="smooth"
Triangle: points=[{x:50,y:0},{x:100,y:100},{x:0,y:100}], closed=true, fillColor="#FF0000"
Sparkline: points=[{x:0,y:50},{x:25,y:10},{x:50,y:70},{x:75,y:30},{x:100,y:50}], curveType="smooth", strokeColor="#00FF00"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| name | No | Path | |
| closed | No | Close the path (connect last point to first) | |
| points | Yes | Array of {x, y} coordinates. Minimum 2 points. | |
| parentId | No | ||
| curveType | No | "straight" for line segments, "smooth" for Catmull-Rom spline curves | straight |
| fillColor | No | Fill color (useful for closed paths or area charts) | |
| strokeColor | No | Stroke color, e.g. "#FF0000" or {r:1,g:0,b:0} | |
| strokeWeight | No |