Skip to content

chipvp/simplify-line

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##What it is A simplified path generator for D3, a drop in replacement for d3.svg.line with the added ability to specify a tolerance.

eg:

var simple = simplePath()
	.tolerance(3)
	.x(function(d){ return dateScale(d.date); })
	.y(function(d){ return valueScale(d.value); })

Based on Simplify.js a tiny high-performance JavaScript polyline simplification library by Vladimir Agafonkin, extracted from Leaflet, a JS interactive maps library by the same author.

It uses a combination of Douglas-Peucker and Radial Distance algorithms.

The reusable code is in simplified-path.js. At the moment I'm using browserify (i.e. require('module') type thing )

About

A drop in replacement for D3s line generator that intelligently simplifies the line data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 67.2%
  • HTML 17.1%
  • CSS 15.7%