
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Inspired by swimlane/ngx-graph, SunGraph is a powerful React component for creating beautiful, interactive graph visualizations. Build stunning flowcharts, organizational charts, network diagrams, and more with minimal effort.
Install SunGraph using npm or yarn:
npm install sun-graph
# or
yarn add sun-graph
import React from 'react';
import { SunGraph } from 'sun-graph';
import { Node, Edge, Graph } from 'sun-graph/graph.model';
import { CustomDagreLayout } from 'sun-graph/layout.model';
function MyGraph() {
const nodes: Node[] = [
{ id: '1', label: 'Node A', width: 100, height: 100 },
{ id: '2', label: 'Node B', width: 100, height: 100 },
{ id: '3', label: 'Node C', width: 100, height: 100 }
];
const edges: Edge[] = [
{ source: '1', target: '2' },
{ source: '2', target: '3' }
];
const graph: Graph = { nodes, edges };
return (
<div style={{ width: '100%', height: '600px' }}>
<SunGraph
graph={graph}
layout={new CustomDagreLayout()}
autoCenter={true}
/>
</div>
);
}
export default MyGraph;
Represent entities in your graph. Each node can have:
Connections between nodes. Features include:
Algorithms that position nodes. SunGraph includes:
See docs/SETUP.md for a complete organization chart example.
See docs/SETUP.md for network visualization with custom styling.
Define custom node rendering:
const customNode: Node = {
id: 'custom-1',
width: 150,
height: 100,
template: (node) => (
<div style={{
width: '100%',
height: '100%',
background: 'linear-gradient(135deg, #667eea, #764ba2)',
borderRadius: '10px',
color: 'white',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}>
<strong>{node.label}</strong>
</div>
)
};
npm install
npm start
Build the library:
npm run buildPackage
Build the documentation site:
npm run buildDocs
npm test
The package includes TypeScript definitions and a ready-to-use template:
npm install sun-graph
Then import:
import { SunGraph } from "sun-graph";
import { Node, Edge, Graph } from "sun-graph/graph.model";
import { Layout } from "sun-graph/layout.model";
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, questions, or feature requests, please open an issue on GitHub.
FAQs
Graph visualization component for react
The npm package sun-graph receives a total of 0 weekly downloads. As such, sun-graph popularity was classified as not popular.
We found that sun-graph demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.