Skip to content

Commit

Permalink
Feat/tree linestyle (#166)
Browse files Browse the repository at this point in the history
* feat/tree style: add linestyle and nodestyle option to tree nodes

* fix/GlobalOptions: add missing SetGlobalOptions func
  • Loading branch information
AndreZiviani committed Mar 20, 2021
1 parent 7a2a78b commit f66a5da
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
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

0 comments on commit f66a5da

Please sign in to comment.