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

Feat/tree linestyle #166

Merged
merged 2 commits into from Mar 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions charts/tree.go
Expand Up @@ -29,6 +29,12 @@ func (c *Tree) AddSeries(name string, data []opts.TreeData, options ...SeriesOpt
return c
}

// SetGlobalOptions sets options for the Graph instance.
func (c *Tree) SetGlobalOptions(options ...GlobalOpts) *Tree {
c.BaseConfiguration.setBaseGlobalOptions(options...)
return c
}

// Validate validates the given configuration.
func (c *Tree) Validate() {
c.Assets.Validate(c.AssetsHost)
Expand Down
6 changes: 6 additions & 0 deletions opts/charts.go
Expand Up @@ -608,6 +608,12 @@ type TreeData struct {

// If set as `true`, the node is collpased in the initialization.
Collapsed bool `json:"collapsed,omitempty"`

// LineStyle settings in this series data.
LineStyle *LineStyle `json:"lineStyle,omitempty"`

// ItemStyle settings in this series data.
ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
}

// SunBurstData data
Expand Down
3 changes: 3 additions & 0 deletions opts/series.go
Expand Up @@ -305,6 +305,9 @@ type TreeLeaves struct {
// The style setting of the text label in a single bar.
Label *Label `json:"label,omitempty"`

// LineStyle settings in this series data.
LineStyle *LineStyle `json:"lineStyle,omitempty"`

// ItemStyle settings in this series data.
ItemStyle *ItemStyle `json:"itemStyle,omitempty"`

Expand Down