Skip to content

LimChihi/InteractGraph

Repository files navigation

InteractGraph

InteractGraph: A weak Graph tool.

⚠️ The InteractGraph is currently undergoing rapid iteration and the public APIs are not guaranteed to be stable.


Feature

  • filter

Node Attributes

  • label
  • long label
  • border color
  • dashed border
  • shape: ellipse, rectangle, roundedRectangle

Edge Attribute

  • directed
  • color
  • dashed

Usage

Prepared graph.

import InteractGraph

var graph: Graph {

  let node0 = Node(label: "0x0: TheBeginningOfEverything")
  ...
  let node42 = Node(label: "0x42: TheAnswerToEverything")
  
  let edge0 = Edge(from: node0, to: node42)
  ...
  let edge42 = Edge(from: node42, to: node0)
 
  return Graph(nodes: [node0, ..., node42], edges: [edge0, ..., edge42])
}

Then bring InteractGraphView to your view

import SwiftUI
import InteractGraph

struct ContentView: View {

  var graph: Graph { ... }
  var body: some View {
    InteractGraphView(graph: graph)
  }
  
}

Requirements

  • iOS 15.0+
  • macOS 12.0+

Future of InteractGraph

  • Optimize graph layering algorithm. (It's longest-path now)
  • More Node's and Edge's Attribute support.
  • JSON Graph data import.
  • Graph data dynamic record.
  • Accessibility.
  • Tests

Sponsors

GitHub sponsors is not supported my region yep.

About

A graph visualization tool

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages