New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

d3-svg-ribbon

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-svg-ribbon

A generator that creates areas based on points and their radii.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

d3.svg.ribbon

d3.svg.ribbon

Interactive example

Designed to interpolate ribbon or band areas based on sample points with radii.

npm install d3-svg-ribbon

#ribbon.x()

The x-accessor for the points array, just like d3.svg.line and d3.svg.area. Defaults to returning d.x.

#ribbon.y()

The y-accessor for the points array, just like d3.svg.line and d3.svg.area. Defaults to returning d.y.

#ribbon.r()

The radius accessor for the points array. This determines the thickness of the ribbon at that point. Defaults to returning d.r.

#ribbon.interpolate()

The D3 interpolation method to use. Currently has strange effects with all interpolators except linear, linear-closed, basis and basis-closed.

###Why?

I was dissatisfied with the way that thicknesses get attenuated creating bump charts with d3.svg.area. If they jump between ranks too significantly, it makes the corresponding graphical transition look too thin. Like the circled blue area, which is rendered significantly thinner than if it was being drawn horizontally.

d3.svg.ribbon

In contrast, the same bump chart using d3.svg.ribbon does not create these attenuation artifacts.

d3.svg.ribbon

Keywords

FAQs

Package last updated on 24 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc