Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@cosmograph/cosmograph
Advanced tools
Cosmograph is a powerful and flexible visualization component built on top of the @cosmograph/cosmos GPU-accelerated force graph layout algorithm and rendering engine.
To install Cosmograph, run the following command:
npm install @cosmograph/cosmograph
To use Cosmograph, import the Cosmograph
class from @cosmograph/cosmograph
and create a new instance of it with a div element and a configuration object. Then, set the data for the graph using the setData
method.
import { Cosmograph } from '@cosmograph/cosmograph'
const nodes = [
{ id: 0, color: 'red' },
{ id: 1, color: 'green' },
{ id: 2, color: 'blue' },
]
const links = [
{ source: 0, target: 1, color: 'blue' },
{ source: 1, target: 2, color: 'green' },
{ source: 2, target: 0, color:'red' },
]
const cosmographContainer = document.createElement('div')
const config = {
simulation: {
repulsion: 0.5,
},
renderLinks: true,
linkColor: link => link.color,
nodeColor: node => node.color,
events: {
onClick: node => {
console.log('Clicked node: ', node)
},
},
/* ... */
}
const cosmograph = new Cosmograph(canvas, config)
cosmograph.setData(nodes, links)
Cosmograph has an extensive set of configuration options that allow you to customize the appearance and behavior of the graph. For more information on configuration options, see the documentation.
Cosmograph is licensed under the CC-BY-NC-4.0 license, or the Creative Commons Attribution-NonCommercial 4.0 International License.
FAQs
Cosmograph: The fastest web-based graph visualization library
The npm package @cosmograph/cosmograph receives a total of 723 weekly downloads. As such, @cosmograph/cosmograph popularity was classified as not popular.
We found that @cosmograph/cosmograph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.