gotoscapejs

package module
v0.0.0-...-64c13e0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2016 License: MIT Imports: 2 Imported by: 1

README

gotoscapejs

Small go package for building Cytoscape networks that can be visualized with Cytoscape.js.

Examples

Have a look at examples/stdout/main.go for an example on how to build a simple Cytoscape network and write its json representation to stdout, and examples/web for the same network visualized with Cytoscape.js. If pipelines in walrus is your thing then have a look at examples/pipeline.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cytoscape

type Cytoscape struct {
	Elements []Element `json:"elements"`
}

func (*Cytoscape) Add

func (cy *Cytoscape) Add(e Element)

func (*Cytoscape) Write

func (cy *Cytoscape) Write(w io.Writer)

type Data

type Data struct {
	Id     string                 `json:"id,omitempty"`
	Parent string                 `json:"parent,omitempty"`
	Source string                 `json:"source,omitempty"`
	Target string                 `json:"target,omitempty"`
	Data   map[string]interface{} `json:"data,omitempty"`
}

type Element

type Element struct {
	Group    string   `json:"group,omitempty"`
	Data     Data     `json:"data,omitempty"`
	Position Position `json:"position,omitempty"`
}

type Position

type Position struct {
	X float64 `json:"x,omitempty"`
	Y float64 `json:"y,omitempty"`
}

Directories

Path Synopsis
examples
web

Jump to

Keyboard shortcuts

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