Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add support for directed graphs #61

Closed
jeffarredondo opened this issue May 7, 2020 · 2 comments
Closed

Please add support for directed graphs #61

jeffarredondo opened this issue May 7, 2020 · 2 comments

Comments

@jeffarredondo
Copy link

Hello would you please consider adding the following variables to the graph chart functionality so that directed graphs can be visualized clearly.

Add to series.go > singleSeries struct (line 201) > Graph Charts (line 219)

EdgeSymbol []string json:"edgeSymbol,omitempty"
EdgeSymbolSize []float32 json:"edgeSymbolSize,omitempty"

// GraphOpts is the option set for graph chart.
type GraphOpts struct {
	//图的布局。可选:
	// "none" 不采用任何布局,使用节点中提供的 x, y 作为节点的位置。
	// "circular" 采用环形布局
	// "force" 采用力引导布局
	Layout string
	// "force", "circular" 布局详细配置项
	Force GraphForce
	// 是否开启鼠标缩放和平移漫游。默认不开启。
	Roam bool
	// 是否在鼠标移到节点上的时候突出显示节点以及节点的边和邻接节点
	FocusNodeAdjacency bool
	//
	Categories []GraphCategory
	// slice of edge symbols for directed graph support [source, target]
	// ["circle","arrow"] for directed link source -> target
	// ["arrow","circle"] for directed link source <- target
	EdgeSymbol []string
	// slice for edge symbol sizes in [source, target] link order
	// [5, 20]
	EdgeSymbolSize []float32

Add to graph.go > GraphOpts struct (line 74)

EdgeSymbol []string
EdgeSymbolSize []float32

// Graph charts
	Links              interface{}     `json:"links,omitempty"`
	Layout             string          `json:"layout,omitempty"`
	Force              GraphForce      `json:"force,omitempty"`
	Categories         []GraphCategory `json:"categories,omitempty"`
	Roam               bool            `json:"roam,omitempty"`
	FocusNodeAdjacency bool            `json:"focusNodeAdjacency,omitempty"`
	EdgeSymbol         []string        `json:"edgeSymbol,omitempty"`
	EdgeSymbolSize     []float32       `json:"edgeSymbolSize,omitempty"`
@chenjiandongx
Copy link
Member

@kotvytskyi
Copy link

Is there any way to visualize the dependency direction? (show an arrow)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants