Debian Codegraph @

charts/bar3d.go

raw symbols SCIP
1 package charts
2
3 import (
4 "github.com/go-echarts/go-echarts/v2/opts"
5 "github.com/go-echarts/go-echarts/v2/render"
6 "github.com/go-echarts/go-echarts/v2/types"
7 )
8
9 // Bar3D represents a 3D bar chart.
10 type Bar3D struct {
11 Chart3D
12 }
13
14 // Type returns the chart type.
15 func (*Bar3D) Type() string { return types.ChartBar3D }
16
17 // NewBar3D creates a new 3D bar chart.
18 func NewBar3D() *Bar3D {
19 c := &Bar3D{}
20 c.initBaseConfiguration()
21 c.Renderer = render.NewChartRender(c, c.Validate)
22 c.initChart3D()
23 return c
24 }
25
26 // AddSeries adds the new series.
27 func (c *Bar3D) AddSeries(name string, data []opts.Chart3DData, options ...SeriesOpts) *Bar3D {
28 c.addSeries(types.ChartBar3D, name, data, options...)
29 return c
30 }