Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@redsift/d3-rs-legends
Advanced tools
d3-rs-legends
generate a legend for charts.
View @redsift/d3-rs-legends on Codepen
![Default bottom orientation](https://bricks.redsift.io/reusable/d3-rs-legends.svg?_datum=['A', 'B', 'C'])
![Left orientation](https://bricks.redsift.io/reusable/d3-rs-legends.svg?_datum=['A', 'B', 'C']&orientation=left)
![Right orientation](https://bricks.redsift.io/reusable/d3-rs-legends.svg?_datum=['A Short', 'B', 'C Long']&orientation=right)
![Top orientation](https://bricks.redsift.io/reusable/d3-rs-legends.svg?_datum=['A', 'B', 'C']&orientation=top&radius=10&padding=40)
<script src="//static.redsift.io/reusable/d3-rs-legends/latest/d3-rs-legends.umd-es2015.min.js"></script>
<script>
var chart = d3_rs_legends.html();
d3.select('body').datum([ 'A', 'B' ]).call(chart);
</script>
import { chart } from "@redsift/d3-rs-legends";
let eml = chart.html();
...
var chart = require("@redsift/d3-rs-legends");
var eml = chart.html();
...
['A', 'B', 'C', ...]
Property | Description | Transition | Preview |
---|---|---|---|
classed | String SVG custom class | N | |
width , height , size , scale | Integer SVG container sizes. Typically, use size to scale the chart | Y | |
margin | Object, Number Margin affecting all chart elements | ||
inset | Object, Number Margin affecting the legend | ||
style | String Custom CSS to inject into chart | N | |
background | Color | ||
theme | *light | dark* | |
orientation | String Location of the legend, one of top , bottom , left , right | N | |
legendSize | Integer Size of the color sample | N | |
spacing | Integer Estimator of the amount of space to resere of each char in the text label | ||
padding | Integer Pixels between each legend element | ||
radius | Integer Radius of the legend rectangle. Rounds the element | ||
fill | Array, Function Colors to assign to legend in order |
FAQs
Generates legends for charts using D3v4.
We found that @redsift/d3-rs-legends demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 23 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.