Debian Codegraph @

charts/surface3d.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 // Surface3D represents a 3D surface chart.
10 type Surface3D struct {
11 Chart3D
12 }
13
14 // Type returns the chart type.
15 func (*Surface3D) Type() string { return types.ChartSurface3D }
16
17 // NewSurface3D creates a new 3d surface chart.
18 func NewSurface3D() *Surface3D {
19 c := &Surface3D{}
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 *Surface3D) AddSeries(name string, data []opts.Chart3DData, options ...SeriesOpts) *Surface3D {
28 c.addSeries(types.ChartScatter3D, name, data, options...)
29 return c
30 }