Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@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 128 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 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.