Knowledge Graph Demo

Interactive graph visualization with Cytoscape.js

Demo Controls

Zoom: 100%
11 nodes 15 edges
Zoom: 100%
Nodes: 0 Edges: 0
Mode: single
3
People and individuals
0%
2
Companies and organizations
0%
3
Technologies and tools
0%
2
Abstract concepts and ideas
0%
1
Places and locations
0%
Total categories: 5
Visible categories: 5
Total nodes: 11
Nodes
11
Edges
15
Graph Density Dense
27.27%
Node Connectivity
Avg Degree: 2.73
Max Degree: 4
Graph Structure
Isolated Nodes: 0
Components: 2
Node Types
personcompanyresearchframeworklibrarylanguagefielddisciplineregion
Edge Types
employmenttechnology_useexpertiseinterestlocationcollaborationcapabilityapplication
Categories
5 categories defined

Features

Interactive Navigation

  • • Pan and zoom the graph
  • • Drag nodes to reposition
  • • Click to select nodes/edges
  • • Hover for additional info

Search & Filter

  • • Search nodes by label
  • • Filter by categories
  • • Hide/show node types
  • • Toggle isolated nodes

Layout Algorithms

  • • Force-directed layouts
  • • Hierarchical arrangements
  • • Grid and circular layouts
  • • Animated transitions

Data Visualization

  • • Color-coded categories
  • • Node size by importance
  • • Edge weights and types
  • • Interactive legend

Export Options

  • • Export as JSON data
  • • Save as PNG image
  • • SVG vector format
  • • Include metadata

Statistics

  • • Graph density metrics
  • • Node connectivity stats
  • • Component analysis
  • • Selection summaries

Usage Example

import { KnowledgeGraphView } from 'ai-ui-kit';

const graphData = {
  nodes: [
    { id: 'node1', label: 'Node 1', category: 'person', color: '#3b82f6' },
    { id: 'node2', label: 'Node 2', category: 'organization', color: '#10b981' }
  ],
  edges: [
    { id: 'edge1', source: 'node1', target: 'node2', label: 'works at' }
  ]
};

const categories = [
  { id: 'person', name: 'Person', color: '#3b82f6', visible: true },
  { id: 'organization', name: 'Organization', color: '#10b981', visible: true }
];

<KnowledgeGraphView
  data={graphData}
  categories={categories}
  layout={{ name: 'cose', animate: true }}
  onNodeClick={(event) => console.log('Node clicked:', event.target)}
/>