Help us shape the future of Go! Take the 2026 Go Developer Survey

graphviz

package
v1.20.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEdgeColor = "black"
View Source
const DefaultFontSize = 14
View Source
const DefaultNodeColor = "black"
View Source
const DefaultNodeFillColor = "lightgrey"
View Source
const DefaultPenWidth = 1
View Source
const DefaultWeight = 1

Variables

This section is empty.

Functions

func Colorize

func Colorize(score float64, isBackground bool) string

Types

type BoxNode

type BoxNode struct {
	TextNode
	Color     string
	FillColor string
}

func NewBoxNode

func NewBoxNode(name string, title string) *BoxNode

func (*BoxNode) SetColorLevel

func (n *BoxNode) SetColorLevel(level, maxLevel int)

func (*BoxNode) SetColors

func (n *BoxNode) SetColors(color, fillColor string)

type Edge

type Edge struct {
	Color    string
	PenWidth float64
	Weight   float64
	// contains filtered or unexported fields
}

func NewEdge

func NewEdge(fromName string, toName string) *Edge

func (*Edge) SetColorLevel

func (e *Edge) SetColorLevel(level, maxLevel int)

type Graph

type Graph struct {
	IsHorizontal bool
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph(name string, title string) *Graph

func (*Graph) AddBoxNode

func (g *Graph) AddBoxNode(node *BoxNode) error

func (*Graph) AddEdge

func (g *Graph) AddEdge(edge *Edge) error

func (*Graph) AddSubGraph

func (g *Graph) AddSubGraph(subGraph *Graph) error

func (*Graph) AddTextNode

func (g *Graph) AddTextNode(node *TextNode) error

func (*Graph) Write

func (g *Graph) Write(w io.Writer) error

type TextNode

type TextNode struct {
	Name     string
	Title    string
	FontSize float64
}

func NewTextNode

func NewTextNode(name string, title string) *TextNode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL