Debian Codegraph @

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