
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
d3-svg-legend
Advanced tools
A legend component for d3. Given a d3.scale it can create either a color legend, size legend, or symbol legend.
Full documentation: http://d3-legend.susielu.com
You must include the d3 library before including the legend file. Then you can simply add the compiled js file to your website:
You can also add the latest version of d3-legend hosted on cdnjs.
You can add the d3 legend as a node module by running:
npm i d3-svg-legend -S
To use the version compatible with d3v3 run:
npm i d3-svg-legend@1.x -S
Using the import syntax import legend from 'd3-svg-legend'
gives access to the three legend types as an object. You can also import them independently for example import { legendColor } from 'd3-svg-legend'
var svg = d3.select("#svg-color-quant");
var quantize = d3.scaleQuantize()
.domain([ 0, 0.15 ])
.range(d3.range(9).map(function(i) { return "q" + i + "-9"; }));
svg.append("g")
.attr("class", "legendQuant")
.attr("transform", "translate(20,20)");
var colorLegend = d3.legendColor()
.labelFormat(d3.format(".2f"))
.useClass(true)
.scale(quantize);
svg.select(".legendQuant")
.call(colorLegend);
I would love to hear from you about any additional features that would be useful, please say hi on twitter @DataToViz.
FAQs
A legend component for d3. Given a d3.scale it can create either a color legend, size legend, or symbol legend.
The npm package d3-svg-legend receives a total of 9,137 weekly downloads. As such, d3-svg-legend popularity was classified as popular.
We found that d3-svg-legend 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.