Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@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
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 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.