
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
A shameless generalization of the ridgeline plot from d3-graph-gallery.
npm i d3-ridge
import {ridge} from 'd3-ridge'
It is assumed that the data bound to ridge is an object, where each ridge is
specified a key in the object and each value corresponds to the numeric values to estimate the density from e.g.
data = {
'A': [95,95,95,95],
'B': [25,30,32,10],
}
more complex data can be provided should utility functions such as valueExtractor
be overwritten from their default behavior:
data = {
A: {
x: { value: 1 },
y: { value: 2 },
...
},
...
}
let container = d3.select('<wherever-you-want-to-dump-the-plot>')
let r = ridge(container)
.valueExtractor(function(d, i){
let subKeys = d3.keys(data[d])
return subKeys.map((k, j)=>data[d][k].value)
})
The following values are all exposed from the ridge closure:
d3.scaleLinear()): scale used on the x axisd3.scaleLinear()): scale used on the y axis()(key, index) => data[key]): how to get the values for each key in dataKeys (should be a list of numeric values)d3.curveBasis): the curve attribute used for rendering the densities(key, index) => {return d3.scaleSequential().interpolator(d3.interpolateViridis)(index / dataKeys.length)}): how to color each ridge0.7): opacity applied to all ridges((k, i)=>'black'): stroke applied to each ridge0.1)7)40)4): number of ticks that appear on the density axis5): number of ticks that appear on the x axis(k, i) => {}): function bound to mouseenter and mousemove events on each ridge(k, i) => {}): function bound to mouseexit and mouseleave events on each ridge'ridge'): included in svg elements to prevent multi-instance selection issuesspaceY - categorySpaceY, in other words it ensures that the
top ridge is visibiletrue)true),true): whether or not the density scale should be includedtrue): whether or not pan and zoom should be bound to chart500): applied to axes and ridgesd3.easeSin): applied to axes and ridgesd3.zoom(): access to the zoom instancezoom invokes. Modify at your own risk.FAQs
Beyond d3: an extension of d3
We found that d3-ridge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.