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.
A collection of components that make it easy to build interactive financial charts with D3.
d3fc and its dependencies (D3, css-layout) are available via npm. Simply install as follows:
npm install d3fc
Once installed, you can reference the d3fc JavaScript, CSS and dependencies within an HTML page as follows:
<script src="node_modules/d3fc/node_modules/d3/d3.js"></script>
<script src="node_modules/d3fc/node_modules/css-layout/src/Layout.js"></script>
<script src="node_modules/d3fc/dist/d3fc.js"></script>
<link href="node_modules/d3fc/dist/d3fc.css" rel="stylesheet"/>
If you want a quick verification that everything has installed correctly, the following code will render a simple time series chart:
<div id="chart"></div>
<script type="text/javascript">
var data = fc.data.random.financial()(50);
var chart = fc.chart.linearTimeSeries()
.xDomain(fc.util.extent(data, 'date'))
.xTicks(5)
.yDomain(fc.util.extent(data, ['high', 'low']))
.yNice()
.yTicks(5);
var gridlines = fc.annotation.gridline();
var candlestick = fc.series.candlestick();
var multi = fc.series.multi()
.series([gridlines, candlestick]);
chart.plotArea(multi);
d3.select('#chart')
.append('svg')
.style({
height: '250px',
width: '600px'
})
.datum(data)
.call(chart);
</script>
To find out more about the various components, visit the project webpage.
npm, the package manager for Node.js, is used to manage the project's dependencies. Grunt, a JavaScript task runner, is used to test and build the project.
npm install -g grunt-cli
npm install
grunt
The following Grunt tasks, found in Gruntfile.js
, can be run from the command line. The most commonly used tasks to build and develop the project are:
grunt build
- generate the project's JavaScript and CSS files in the dist directory (at the root of the project); build the visual testsgrunt dev
- run grunt build
, then grunt watch
grunt dev:serve
- same as grunt dev
but also starts a web server for viewing the visual testsOther tasks include:
grunt check
- run JSHint and JSCS checksgrunt test
- run unit tests and build the visual testsgrunt watch
- watch the source files and rebuild when a change is savedgrunt serve
- start a web server for viewing the visual testsgrunt
- check, test and build the projectThe project includes a number of unit tests, however, because these components are visual in nature, unit testing is not enough. This project contains a number of ad-hoc visual tests that are found within the visual-tests
folder. The visual tests are compiled, via assemble, to create a simple website. To view this site, run grunt serve
or a static server from the visual-tests\dist
folder.
These components are licensed under the MIT License.
FAQs
A collection of components that make it easy to build interactive charts with D3
We found that d3fc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
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.