Skip to content
Back to skills

2263 Curves 1fabdaca

ASecurity

Curves define how to interpolate between discrete data points in line, area, and link marks.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
developmentjavascriptgojava

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 2263-curves_1fabdaca --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2263 Curves 1fabdaca?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2263 Curves 1fabdaca
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2263-curves-1fabdaca/badge)](https://www.skillsdirectory.com/skills/tools-only-2263-curves-1fabdaca)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Curves

Curves define how to interpolate between discrete data points in line, area, and link marks.

## Usage

```javascript
Plot.line(data, {x: "x", y: "y", curve: "catmull-rom"})
```

## Curve Types

### Linear

| Curve | Description |
|-------|-------------|
| `linear` | Straight line segments (default) |
| `linear-closed` | Closed polygon |

### Step Functions

| Curve | Description |
|-------|-------------|
| `step` | Y changes at midpoint |
| `step-after` | Y changes after X |
| `step-before` | Y changes before X |

```javascript
// Step chart
Plot.lineY(data, {x: "date", y: "value", curve: "step"}).plot()
```

### Splines

| Curve | Description |
|-------|-------------|
| `basis` | Cubic B-spline |
| `basis-open` | Open B-spline |
| `basis-closed` | Closed B-spline |
| `cardinal` | Cardinal spline |
| `cardinal-open` | Open cardinal |
| `cardinal-closed` | Closed cardinal |
| `catmull-rom` | Catmull-Rom spline |
| `catmull-rom-open` | Open Catmull-Rom |
| `catmull-rom-closed` | Closed Catmull-Rom |
| `natural` | Natural cubic spline |
| `bundle` | Straightened B-spline (lines only) |

```javascript
// Smooth line
Plot.line(data, {x: "x", y: "y", curve: "natural"}).plot()
```

### Bézier

| Curve | Description |
|-------|-------------|
| `bump-x` | Horizontal tangents |
| `bump-y` | Vertical tangents |

```javascript
// Organizational chart links
Plot.link(hierarchy, {
  x1: "parent.x", y1: "parent.y",
  x2: "x", y2: "y",
  curve: "bump-y"
})
```

### Monotone

| Curve | Description |
|-------|-------------|
| `monotone-x` | Preserves monotonicity in x |
| `monotone-y` | Preserves monotonicity in y |

```javascript
// Avoid overshooting
Plot.line(data, {x: "x", y: "y", curve: "monotone-x"}).plot()
```

### Special

| Curve | Description |
|-------|-------------|
| `auto` | Geodesic with projection |

## Tension Parameter

Affects bundle, cardinal, and Catmull-Rom curves:

```javascript
Plot.line(data, {
  x: "x",
  y: "y",
  curve: "cardinal",
  tension: 0.5  // 0 to 1
})
```

## Choosing a Curve

| Use Case | Recommended Curve |
|----------|------------------|
| Default | `linear` |
| Smooth continuous | `natural` or `catmull-rom` |
| Step changes | `step`, `step-after` |
| No overshooting | `monotone-x` |
| Hierarchical links | `bump-x` or `bump-y` |
| Geographic | `auto` (with projection) |

## Examples

### Area with Step
```javascript
Plot.areaY(data, {
  x: "date",
  y: "value",
  curve: "step"
}).plot()
```

### Smooth Line
```javascript
Plot.line(data, {
  x: "date",
  y: "value",
  curve: "catmull-rom"
}).plot()
```

### Tree Links
```javascript
Plot.link(tree.links(), {
  x1: d => d.source.x,
  y1: d => d.source.y,
  x2: d => d.target.x,
  y2: d => d.target.y,
  curve: "bump-y"
}).plot()
```

## Notes

- All curves implemented via d3-shape
- Closed curves connect last point to first
- Open curves don't pass through endpoints
- Use `monotone-x` to prevent overshooting in charts
- Geographic lines become geodesics with `auto` curve

Files in this skill

  • README.md817 B
  • skill.md2.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.