Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Margin conventions for d3-selection.
If you use NPM, npm install d3-marcon
. Otherwise, download the latest release.
You can also load directly from unpkg. You may use the entire D3.js library or, at a minimum, d3-selection.
<script src="https://d3js.org/d3-selection.v1.min.js"></script>
<script src="https://unpkg.com/d3-marcon/build/d3-marcon.min.js"></script>
<script>
var m = d3.marcon()
.top(10)
.bottom(10)
.left(10)
.right(10);
m.render();
m.svg().append("rect")
.attr("width", m.innerWidth())
.attr("height", m.innerHeight())
.style("fill", "steelblue");
</script>
A live example on bl.ocks.org.
Constructs a visualization generator, or viz, on which you can set and get the dimensions and margins, and append an svg
element with a nested g
to a DOM element.
Selects a DOM element to append the viz to. Defaults to "body"
.
Sets or gets the viz's top margin. Defaults to 0
.
Sets or gets the viz's right margin. Defaults to 0
.
Sets or gets the viz's bottom margin. Defaults to 0
.
Sets or gets the viz's left margin. Defaults to 0
.
Sets or gets the viz's width. Defaults to 900
.
Sets or gets the viz's height. Defaults to 600
.
Gets the viz's innerWidth, which is equal to width - left - right
.
Gets the viz's innerHeight, which is equal to height - top - bottom
.
Renders the viz to the DOM.
Gets the svg
element that contains the viz. Returns undefined
if the viz has not yet been rendered.
FAQs
Margin conventions for d3-selection.
The npm package d3-marcon receives a total of 57 weekly downloads. As such, d3-marcon popularity was classified as not popular.
We found that d3-marcon 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.