Skip to content
Interpolate a path using `stroke-dasharray`. Based on https://bl.ocks.org/mbostock/5649592
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.md
README.md
index.js
package.json
test.js

README.md

d3-transition-stroke

Interpolate a path using stroke-dasharray. Based on https://bl.ocks.org/mbostock/5649592

Install

npm install d3-transition-stroke

Usage

var transitionStroke = require('d3-transition-stroke')

// ...

var sel = svg.selectAll('path')
    .data(data)

  // ENTER
  sel.enter().append('path')
    .attr('d', d => line(d))

  // ENTER + UPDATE
  sel.transition('stroke')
      .call(transitionStroke)

API

transitionStroke(selection)

selection

D3 Transition Selection

TODO

This module implicitly depends on D3 3.x, but should be updated to depend on the modules of D3 4.x.

License

ISC

You can’t perform that action at this time.