diff --git a/charts/tree.go b/charts/tree.go index 6ce82c163..8d14d44f5 100644 --- a/charts/tree.go +++ b/charts/tree.go @@ -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) diff --git a/opts/charts.go b/opts/charts.go index 8e38b6045..9e6233ffa 100644 --- a/opts/charts.go +++ b/opts/charts.go @@ -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 diff --git a/opts/series.go b/opts/series.go index 9bf584be6..57842f59b 100644 --- a/opts/series.go +++ b/opts/series.go @@ -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"`