charts

package
v2.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar struct {
	RectChart
	// contains filtered or unexported fields
}

Bar represents a bar chart.

func NewBar

func NewBar() *Bar

NewBar creates a new bar chart instance.

func (*Bar) AddSeries

func (c *Bar) AddSeries(name string, data []opts.BarData, options ...SeriesOpts) *Bar

AddSeries adds the new series.

func (*Bar) EnablePolarType

func (c *Bar) EnablePolarType() *Bar

EnablePolarType enable polar bar

func (*Bar) SetXAxis

func (c *Bar) SetXAxis(x interface{}) *Bar

SetXAxis sets the X axis.

func (Bar) Type

func (Bar) Type() string

Type returns the chart type.

func (*Bar) Validate

func (c *Bar) Validate()

Validate validates the given configuration.

func (*Bar) XYReversal

func (c *Bar) XYReversal() *Bar

XYReversal checks if X axis and Y axis are reversed.

type Bar3D

type Bar3D struct {
	Chart3D
}

Bar3D represents a 3D bar chart.

func NewBar3D

func NewBar3D() *Bar3D

NewBar3D creates a new 3D bar chart.

func (*Bar3D) AddSeries

func (c *Bar3D) AddSeries(name string, data []opts.Chart3DData, options ...SeriesOpts) *Bar3D

AddSeries adds the new series.

func (Bar3D) Type

func (Bar3D) Type() string

Type returns the chart type.

type BaseConfiguration

type BaseConfiguration struct {
	opts.Legend     `json:"legend"`
	opts.Tooltip    `json:"tooltip"`
	opts.Toolbox    `json:"toolbox"`
	opts.Title      `json:"title"`
	opts.Polar      `json:"polar"`
	opts.AngleAxis  `json:"angleAxis"`
	opts.RadiusAxis `json:"radiusAxis"`

	render.Renderer        `json:"-"`
	opts.Initialization    `json:"-"`
	opts.Assets            `json:"-"`
	opts.RadarComponent    `json:"-"`
	opts.GeoComponent      `json:"-"`
	opts.ParallelComponent `json:"-"`
	opts.JSFunctions       `json:"-"`
	opts.SingleAxis        `json:"-"`

	MultiSeries
	XYAxis

	opts.Grid
	opts.TextStyle

	opts.XAxis3D
	opts.YAxis3D
	opts.ZAxis3D
	opts.Grid3D

	// Colors is the color list of palette.
	// If no color is set in series, the colors would be adopted sequentially and circularly
	// from this list as the colors of series.
	Colors []string

	DataZoomList  []opts.DataZoom  `json:"datazoom,omitempty"`
	VisualMapList []opts.VisualMap `json:"visualmap,omitempty"`

	// ParallelAxisList represents the component list which is the coordinate axis for parallel coordinate.
	ParallelAxisList []opts.ParallelAxis
	// contains filtered or unexported fields
}

BaseConfiguration represents an option set needed by all chart types.

func (*BaseConfiguration) GetAssets

func (bc *BaseConfiguration) GetAssets() opts.Assets

GetAssets returns the Assets options

func (*BaseConfiguration) JSON

func (bc *BaseConfiguration) JSON() map[string]interface{}

JSON wraps all the options to a map so that it could be used in the base template

Get data in bytes bs, _ : = json.Marshal(bar.JSON())

type BoxPlot

type BoxPlot struct {
	RectChart
}

BoxPlot represents a boxplot chart.

func NewBoxPlot

func NewBoxPlot() *BoxPlot

NewBoxPlot creates a new boxplot chart.

func (*BoxPlot) AddSeries

func (c *BoxPlot) AddSeries(name string, data []opts.BoxPlotData, options ...SeriesOpts) *BoxPlot

AddSeries adds the new series.

func (*BoxPlot) SetXAxis

func (c *BoxPlot) SetXAxis(x interface{}) *BoxPlot

SetXAxis adds the X axis.

func (BoxPlot) Type

func (BoxPlot) Type() string

Type returns the chart type.

func (*BoxPlot) Validate

func (c *BoxPlot) Validate()

Validate validates the given configuration.

type Chart3D

type Chart3D struct {
	BaseConfiguration
}

Chart3D is a chart in 3D coordinates.

func (*Chart3D) SetGlobalOptions

func (c *Chart3D) SetGlobalOptions(options ...GlobalOpts) *Chart3D

SetGlobalOptions sets options for the Chart3D instance.

func (*Chart3D) Validate

func (c *Chart3D) Validate()

Validate

type EffectScatter

type EffectScatter struct {
	RectChart
}

EffectScatter represents an effect scatter chart.

func NewEffectScatter

func NewEffectScatter() *EffectScatter

NewEffectScatter creates a new effect scatter chart.

func (*EffectScatter) AddSeries

func (c *EffectScatter) AddSeries(name string, data []opts.EffectScatterData, options ...SeriesOpts) *EffectScatter

AddSeries adds the Y axis.

func (*EffectScatter) SetXAxis

func (c *EffectScatter) SetXAxis(x interface{}) *EffectScatter

SetXAxis adds the X axis.

func (EffectScatter) Type

func (EffectScatter) Type() string

Type returns the chart type.

func (*EffectScatter) Validate

func (c *EffectScatter) Validate()

Validate validates the given configuration.

type Funnel

type Funnel struct {
	BaseConfiguration
}

Funnel represents a funnel chart.

func NewFunnel

func NewFunnel() *Funnel

NewFunnel creates a new funnel chart.

func (*Funnel) AddSeries

func (c *Funnel) AddSeries(name string, data []opts.FunnelData, options ...SeriesOpts) *Funnel

AddSeries adds new data sets.

func (*Funnel) SetGlobalOptions

func (c *Funnel) SetGlobalOptions(options ...GlobalOpts) *Funnel

SetGlobalOptions sets options for the Funnel instance.

func (Funnel) Type

func (Funnel) Type() string

Type returns the chart type.

func (*Funnel) Validate

func (c *Funnel) Validate()

Validate

type Gauge

type Gauge struct {
	BaseConfiguration
}

Gauge represents a gauge chart.

func NewGauge

func NewGauge() *Gauge

NewGauge creates a new gauge chart.

func (*Gauge) AddSeries

func (c *Gauge) AddSeries(name string, data []opts.GaugeData, options ...SeriesOpts) *Gauge

AddSeries adds new data sets.

func (*Gauge) SetGlobalOptions

func (c *Gauge) SetGlobalOptions(options ...GlobalOpts) *Gauge

SetGlobalOptions sets options for the Gauge instance.

func (Gauge) Type

func (Gauge) Type() string

Type returns the chart type.

func (*Gauge) Validate

func (c *Gauge) Validate()

Validate

type Geo

type Geo struct {
	BaseConfiguration
}

Geo represents a geo chart.

func NewGeo

func NewGeo() *Geo

NewGeo creates a new geo chart.

func (*Geo) AddSeries

func (c *Geo) AddSeries(name, geoType string, data []opts.GeoData, options ...SeriesOpts) *Geo

AddSeries adds new data sets. geoType options: * types.ChartScatter * types.ChartEffectScatter * types.ChartHeatMap

func (*Geo) SetGlobalOptions

func (c *Geo) SetGlobalOptions(options ...GlobalOpts) *Geo

SetGlobalOptions sets options for the Geo instance.

func (Geo) Type

func (Geo) Type() string

Type returns the chart type.

func (*Geo) Validate

func (c *Geo) Validate()

Validate

type GlobalOpts

type GlobalOpts func(bc *BaseConfiguration)

GlobalOpts sets the Global options for charts.

func WithAngleAxisOps

func WithAngleAxisOps(opt opts.AngleAxis) GlobalOpts

WithPolarOps set angleAxis

func WithColorsOpts

func WithColorsOpts(opt opts.Colors) GlobalOpts

WithColorsOpts

func WithDataZoomOpts

func WithDataZoomOpts(opt ...opts.DataZoom) GlobalOpts

WithDataZoomOpts

func WithGeoComponentOpts

func WithGeoComponentOpts(opt opts.GeoComponent) GlobalOpts

WithGeoComponentOpts

func WithGrid3DOpts

func WithGrid3DOpts(opt opts.Grid3D) GlobalOpts

WithGrid3DOpts

func WithGridOpts

func WithGridOpts(opt opts.Grid) GlobalOpts

WithGridOpts

func WithInitializationOpts

func WithInitializationOpts(opt opts.Initialization) GlobalOpts

WithInitializationOpts

func WithLegendOpts

func WithLegendOpts(opt opts.Legend) GlobalOpts

WithLegendOpts

func WithParallelAxisList

func WithParallelAxisList(opt []opts.ParallelAxis) GlobalOpts

WithParallelAxisList

func WithParallelComponentOpts

func WithParallelComponentOpts(opt opts.ParallelComponent) GlobalOpts

WithParallelComponentOpts

func WithPolarOps

func WithPolarOps(opt opts.Polar) GlobalOpts

WithPolarOps set polar

func WithRadarComponentOpts

func WithRadarComponentOpts(opt opts.RadarComponent) GlobalOpts

WithRadarComponentOpts

func WithRadiusAxisOps

func WithRadiusAxisOps(opt opts.RadiusAxis) GlobalOpts

WithPolarOps set radiusAxis

func WithSingleAxisOpts

func WithSingleAxisOpts(opt opts.SingleAxis) GlobalOpts

WithSingleAxisOpts

func WithTextStyle

func WithTextStyle(opt opts.TextStyle) GlobalOpts

WithTextStyle

func WithTitleOpts

func WithTitleOpts(opt opts.Title) GlobalOpts

WithTitleOpts

func WithToolboxOpts

func WithToolboxOpts(opt opts.Toolbox) GlobalOpts

WithToolboxOpts

func WithTooltipOpts

func WithTooltipOpts(opt opts.Tooltip) GlobalOpts

WithTooltipOpts

func WithVisualMapOpts

func WithVisualMapOpts(opt ...opts.VisualMap) GlobalOpts

WithVisualMapOpts

func WithXAxis3DOpts

func WithXAxis3DOpts(opt opts.XAxis3D) GlobalOpts

WithXAxis3DOpts

func WithXAxisOpts

func WithXAxisOpts(opt opts.XAxis, index ...int) GlobalOpts

WithXAxisOpts

func WithYAxis3DOpts

func WithYAxis3DOpts(opt opts.YAxis3D) GlobalOpts

WithYAxis3DOpts

func WithYAxisOpts

func WithYAxisOpts(opt opts.YAxis, index ...int) GlobalOpts

WithYAxisOpts

func WithZAxis3DOpts

func WithZAxis3DOpts(opt opts.ZAxis3D) GlobalOpts

WithZAxis3DOpts

type Graph

type Graph struct {
	BaseConfiguration
}

Graph represents a graph chart.

func NewGraph

func NewGraph() *Graph

NewGraph creates a new graph chart.

func (*Graph) AddSeries

func (c *Graph) AddSeries(name string, nodes []opts.GraphNode, links []opts.GraphLink, options ...SeriesOpts) *Graph

AddSeries adds the new series.

func (*Graph) SetGlobalOptions

func (c *Graph) SetGlobalOptions(options ...GlobalOpts) *Graph

SetGlobalOptions sets options for the Graph instance.

func (Graph) Type

func (Graph) Type() string

Type returns the chart type.

func (*Graph) Validate

func (c *Graph) Validate()

Validate validates the given configuration.

type HeatMap

type HeatMap struct {
	RectChart
}

HeatMap represents a heatmap chart.

func NewHeatMap

func NewHeatMap() *HeatMap

NewHeatMap creates a new heatmap chart.

func (*HeatMap) AddSeries

func (c *HeatMap) AddSeries(name string, data []opts.HeatMapData, options ...SeriesOpts) *HeatMap

AddSeries adds the new series.

func (*HeatMap) SetXAxis

func (c *HeatMap) SetXAxis(x interface{}) *HeatMap

SetXAxis adds the X axis.

func (HeatMap) Type

func (HeatMap) Type() string

Type returns the chart type.

func (*HeatMap) Validate

func (c *HeatMap) Validate()

Validate

type Kline

type Kline struct {
	RectChart
}

Kline represents a kline chart.

func NewKLine

func NewKLine() *Kline

NewKLine creates a new kline chart.

func (*Kline) AddSeries

func (c *Kline) AddSeries(name string, data []opts.KlineData, options ...SeriesOpts) *Kline

AddSeries adds the new series.

func (*Kline) SetXAxis

func (c *Kline) SetXAxis(xAxis interface{}) *Kline

SetXAxis adds the X axis.

func (Kline) Type

func (Kline) Type() string

Type returns the chart type.

func (*Kline) Validate

func (c *Kline) Validate()

Validate

type Line

type Line struct {
	RectChart
}

Line represents a line chart.

func NewLine

func NewLine() *Line

NewLine creates a new line chart.

func (*Line) AddSeries

func (c *Line) AddSeries(name string, data []opts.LineData, options ...SeriesOpts) *Line

AddSeries adds the new series.

func (*Line) SetXAxis

func (c *Line) SetXAxis(x interface{}) *Line

SetXAxis adds the X axis.

func (Line) Type

func (Line) Type() string

Type returns the chart type.

func (*Line) Validate

func (c *Line) Validate()

Validate validates the given configuration.

type Line3D

type Line3D struct {
	Chart3D
}

Line3D represents a 3D line chart.

func NewLine3D

func NewLine3D() *Line3D

NewLine3D creates a new 3D line chart.

func (*Line3D) AddSeries

func (c *Line3D) AddSeries(name string, data []opts.Chart3DData, options ...SeriesOpts) *Line3D

AddSeries adds the new series.

func (Line3D) Type

func (Line3D) Type() string

Type returns the chart type.

type Liquid

type Liquid struct {
	BaseConfiguration
}

Liquid represents a liquid chart.

func NewLiquid

func NewLiquid() *Liquid

NewLiquid creates a new liquid chart.

func (*Liquid) AddSeries

func (c *Liquid) AddSeries(name string, data []opts.LiquidData, options ...SeriesOpts) *Liquid

AddSeries adds new data sets.

func (*Liquid) SetGlobalOptions

func (c *Liquid) SetGlobalOptions(options ...GlobalOpts) *Liquid

SetGlobalOptions sets options for the Liquid instance.

func (Liquid) Type

func (Liquid) Type() string

Type returns the chart type.

func (*Liquid) Validate

func (c *Liquid) Validate()

Validate

type Map

type Map struct {
	BaseConfiguration
	// contains filtered or unexported fields
}

Map represents a map chart.

func NewMap

func NewMap() *Map

NewMap creates a new map chart.

func (*Map) AddSeries

func (c *Map) AddSeries(name string, data []opts.MapData, options ...SeriesOpts) *Map

AddSeries adds new data sets.

func (*Map) RegisterMapType

func (c *Map) RegisterMapType(mapType string)

RegisterMapType

func (*Map) SetGlobalOptions

func (c *Map) SetGlobalOptions(options ...GlobalOpts) *Map

SetGlobalOptions sets options for the Map instance.

func (Map) Type

func (Map) Type() string

Type returns the chart type.

func (*Map) Validate

func (c *Map) Validate()

Validate

type MultiSeries

type MultiSeries []SingleSeries

MultiSeries represents multiple series.

func (*MultiSeries) SetSeriesOptions

func (ms *MultiSeries) SetSeriesOptions(opts ...SeriesOpts)

SetSeriesOptions sets options for all the series. Previous options will be overwrote every time hence setting them on the `AddSeries` if you want to customize each series individually

here -> ↓ <-

func (c *Bar) AddSeries(name string, data []opts.BarData, options ...SeriesOpts)

type Overlaper

type Overlaper interface {
	// contains filtered or unexported methods
}

type Parallel

type Parallel struct {
	BaseConfiguration
}

Parallel represents a parallel axis.

func NewParallel

func NewParallel() *Parallel

NewParallel creates a new parallel instance.

func (*Parallel) AddSeries

func (c *Parallel) AddSeries(name string, data []opts.ParallelData, options ...SeriesOpts) *Parallel

AddSeries adds new data sets.

func (*Parallel) SetGlobalOptions

func (c *Parallel) SetGlobalOptions(options ...GlobalOpts) *Parallel

SetGlobalOptions sets options for the Parallel instance.

func (Parallel) Type

func (Parallel) Type() string

Type returns the chart type.

func (*Parallel) Validate

func (c *Parallel) Validate()

Validate

type Pie

type Pie struct {
	BaseConfiguration
}

Pie represents a pie chart.

func NewPie

func NewPie() *Pie

NewPie creates a new pie chart.

func (*Pie) AddSeries

func (c *Pie) AddSeries(name string, data []opts.PieData, options ...SeriesOpts) *Pie

AddSeries adds new data sets.

func (*Pie) SetGlobalOptions

func (c *Pie) SetGlobalOptions(options ...GlobalOpts) *Pie

SetGlobalOptions sets options for the Pie instance.

func (Pie) Type

func (Pie) Type() string

Type returns the chart type.

func (*Pie) Validate

func (c *Pie) Validate()

Validate

type Radar

type Radar struct {
	BaseConfiguration
}

Radar represents a radar chart.

func NewRadar

func NewRadar() *Radar

NewRadar creates a new radar chart.

func (*Radar) AddSeries

func (c *Radar) AddSeries(name string, data []opts.RadarData, options ...SeriesOpts) *Radar

AddSeries adds new data sets.

func (*Radar) SetGlobalOptions

func (c *Radar) SetGlobalOptions(options ...GlobalOpts) *Radar

SetGlobalOptions sets options for the Radar instance.

func (Radar) Type

func (Radar) Type() string

Type returns the chart type.

func (*Radar) Validate

func (c *Radar) Validate()

Validate

type RectChart

type RectChart struct {
	RectConfiguration
	// contains filtered or unexported fields
}

RectChart is a chart in RectChart coordinate.

func (*RectChart) Overlap

func (rc *RectChart) Overlap(a ...Overlaper)

Overlap composes multiple charts into one single canvas. It is only suited for some of the charts which are in rectangular coordinate. Supported charts: Bar/BoxPlot/Line/Scatter/EffectScatter/Kline/HeatMap

func (*RectChart) SetGlobalOptions

func (rc *RectChart) SetGlobalOptions(options ...GlobalOpts) *RectChart

SetGlobalOptions sets options for the RectChart instance.

func (*RectChart) Validate

func (rc *RectChart) Validate()

Validate

type RectConfiguration

type RectConfiguration struct {
	BaseConfiguration
}

RectConfiguration contains options for the rectangular coordinates.

type Sankey

type Sankey struct {
	BaseConfiguration
}

Sankey represents a sankey chart.

func NewSankey

func NewSankey() *Sankey

NewSankey creates a new sankey chart.

func (*Sankey) AddSeries

func (c *Sankey) AddSeries(name string, nodes []opts.SankeyNode, links []opts.SankeyLink, options ...SeriesOpts) *Sankey

AddSeries adds new data sets.

func (*Sankey) SetGlobalOptions

func (c *Sankey) SetGlobalOptions(options ...GlobalOpts) *Sankey

SetGlobalOptions sets options for the Sankey instance.

func (Sankey) Type

func (Sankey) Type() string

Type returns the chart type.

func (*Sankey) Validate

func (c *Sankey) Validate()

Validate

type Scatter

type Scatter struct {
	RectChart
}

Scatter represents a scatter chart.

func NewScatter

func NewScatter() *Scatter

NewScatter creates a new scatter chart.

func (*Scatter) AddSeries

func (c *Scatter) AddSeries(name string, data []opts.ScatterData, options ...SeriesOpts) *Scatter

AddSeries adds the new series.

func (*Scatter) SetXAxis

func (c *Scatter) SetXAxis(x interface{}) *Scatter

SetXAxis adds the X axis.

func (Scatter) Type

func (Scatter) Type() string

Type returns the chart type.

func (*Scatter) Validate

func (c *Scatter) Validate()

Validate validates the given configuration.

type Scatter3D

type Scatter3D struct {
	Chart3D
}

Scatter3D represents a 3D scatter chart.

func NewScatter3D

func NewScatter3D() *Scatter3D

NewScatter3D creates a new 3D scatter chart.

func (*Scatter3D) AddSeries

func (c *Scatter3D) AddSeries(name string, data []opts.Chart3DData, options ...SeriesOpts) *Scatter3D

AddSeries adds the new series.

func (Scatter3D) Type

func (Scatter3D) Type() string

Type returns the chart type.

type SeriesOpts

type SeriesOpts func(s *SingleSeries)

func WithAreaStyleOpts

func WithAreaStyleOpts(opt opts.AreaStyle) SeriesOpts

WithAreaStyleOpts

func WithBar3DChartOpts

func WithBar3DChartOpts(opt opts.Bar3DChart) SeriesOpts

WithBar3DChartOpts

func WithBarChartOpts

func WithBarChartOpts(opt opts.BarChart) SeriesOpts

WithBarChartOpts

func WithEmphasisOpts

func WithEmphasisOpts(opt opts.Emphasis) SeriesOpts

WithEmphasisOpts

func WithGraphChartOpts

func WithGraphChartOpts(opt opts.GraphChart) SeriesOpts

WithGraphChartOpts

func WithHeatMapChartOpts

func WithHeatMapChartOpts(opt opts.HeatMapChart) SeriesOpts

WithHeatMapChartOpts

func WithItemStyleOpts

func WithItemStyleOpts(opt opts.ItemStyle) SeriesOpts

WithItemStyleOpts

func WithLabelOpts

func WithLabelOpts(opt opts.Label) SeriesOpts

WithLabelOpts

func WithLineChartOpts

func WithLineChartOpts(opt opts.LineChart) SeriesOpts

WithLineChartOpts

func WithLineStyleOpts

func WithLineStyleOpts(opt opts.LineStyle) SeriesOpts

WithLineStyleOpts

func WithLiquidChartOpts

func WithLiquidChartOpts(opt opts.LiquidChart) SeriesOpts

WithLiquidChartOpts

func WithMarkLineNameTypeItemOpts

func WithMarkLineNameTypeItemOpts(opt ...opts.MarkLineNameTypeItem) SeriesOpts

WithMarkLineNameTypeItemOpts

func WithMarkLineNameXAxisItemOpts

func WithMarkLineNameXAxisItemOpts(opt ...opts.MarkLineNameXAxisItem) SeriesOpts

WithMarkLineNameXAxisItemOpts

func WithMarkLineNameYAxisItemOpts

func WithMarkLineNameYAxisItemOpts(opt ...opts.MarkLineNameYAxisItem) SeriesOpts

WithMarkLineNameYAxisItemOpts

func WithMarkLineStyleOpts

func WithMarkLineStyleOpts(opt opts.MarkLineStyle) SeriesOpts

WithMarkLineStyleOpts

func WithMarkPointNameCoordItemOpts

func WithMarkPointNameCoordItemOpts(opt ...opts.MarkPointNameCoordItem) SeriesOpts

WithMarkPointNameCoordItemOpts

func WithMarkPointNameTypeItemOpts

func WithMarkPointNameTypeItemOpts(opt ...opts.MarkPointNameTypeItem) SeriesOpts

WithMarkPointNameTypeItemOpts

func WithMarkPointStyleOpts

func WithMarkPointStyleOpts(opt opts.MarkPointStyle) SeriesOpts

WithMarkPointStyleOpts

func WithPieChartOpts

func WithPieChartOpts(opt opts.PieChart) SeriesOpts

WithPieChartOpts

func WithRippleEffectOpts

func WithRippleEffectOpts(opt opts.RippleEffect) SeriesOpts

WithRippleEffectOpts

func WithScatterChartOpts

func WithScatterChartOpts(opt opts.ScatterChart) SeriesOpts

WithScatterChartOpts

func WithSunburstOpts

func WithSunburstOpts(opt opts.SunburstChart) SeriesOpts

func WithTreeOpts

func WithTreeOpts(opt opts.TreeChart) SeriesOpts

WithTreeOpts

func WithWorldCloudChartOpts

func WithWorldCloudChartOpts(opt opts.WordCloudChart) SeriesOpts

WithWorldCloudChartOpts

type SingleSeries

type SingleSeries struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`

	// Rectangular charts
	Stack      string `json:"stack,omitempty"`
	XAxisIndex int    `json:"xAxisIndex,omitempty"`
	YAxisIndex int    `json:"yAxisIndex,omitempty"`

	// Bar
	BarGap         string `json:"barGap,omitempty"`
	BarCategoryGap string `json:"barCategoryGap,omitempty"`
	ShowBackground bool   `json:"showBackground,omitempty"`
	RoundCap       bool   `json:"roundCap,omitempty"`

	// Bar3D
	Shading string `json:"shading,omitempty"`

	// Graph
	Links              interface{} `json:"links,omitempty"`
	Layout             string      `json:"layout,omitempty"`
	Force              interface{} `json:"force,omitempty"`
	Categories         interface{} `json:"categories,omitempty"`
	Roam               bool        `json:"roam,omitempty"`
	FocusNodeAdjacency bool        `json:"focusNodeAdjacency,omitempty"`

	// Line
	Step         bool `json:"step,omitempty"`
	Smooth       bool `json:"smooth,omitempty"`
	ConnectNulls bool `json:"connectNulls,omitempty"`

	// Liquid
	IsLiquidOutline bool `json:"outline,omitempty"`
	IsWaveAnimation bool `json:"waveAnimation"`

	// Map
	MapType          string `json:"map,omitempty"`
	CoordSystem      string `json:"coordinateSystem,omitempty"`
	ShowLegendSymbol bool   `json:"showLegendSymbol"`

	// Pie
	RoseType interface{} `json:"roseType,omitempty"`
	Center   interface{} `json:"center,omitempty"`
	Radius   interface{} `json:"radius,omitempty"`

	// Scatter
	SymbolSize float32 `json:"symbolSize,omitempty"`

	// Tree
	Orient            string      `json:"orient,omitempty"`
	ExpandAndCollapse bool        `json:"expandAndCollapse,omitempty"`
	InitialTreeDepth  int         `json:"initialTreeDepth,omitempty"`
	Leaves            interface{} `json:"leaves,omitempty"`
	Left              string      `json:"left,omitempty"`
	Right             string      `json:"right,omitempty"`
	Top               string      `json:"top,omitempty"`
	Bottom            string      `json:"bottom,omitempty"`

	// WordCloud
	Shape         string    `json:"shape,omitempty"`
	SizeRange     []float32 `json:"sizeRange,omitempty"`
	RotationRange []float32 `json:"rotationRange,omitempty"`

	// Sunburst
	NodeClick               string `json:"nodeClick,omitempty"`
	Sort                    string `json:"sort,omitempty"`
	RenderLabelForZeroData  bool   `json:"renderLabelForZeroData"`
	SelectedMode            bool   `json:"selectedMode"`
	Animation               bool   `json:"animation"`
	AnimationThreshold      int    `json:"animationThreshold,omitempty"`
	AnimationDuration       int    `json:"animationDuration,omitempty"`
	AnimationEasing         string `json:"animationEasing,omitempty"`
	AnimationDelay          int    `json:"animationDelay,omitempty"`
	AnimationDurationUpdate int    `json:"animationDurationUpdate,omitempty"`
	AnimationEasingUpdate   string `json:"animationEasingUpdate,omitempty"`
	AnimationDelayUpdate    int    `json:"animationDelayUpdate,omitempty"`

	// series data
	Data interface{} `json:"data"`

	// series options
	*opts.ItemStyle    `json:"itemStyle,omitempty"`
	*opts.Label        `json:"label,omitempty"`
	*opts.LabelLine    `json:"labelLine,omitempty"`
	*opts.Emphasis     `json:"emphasis,omitempty"`
	*opts.MarkLines    `json:"markLine,omitempty"`
	*opts.MarkPoints   `json:"markPoint,omitempty"`
	*opts.RippleEffect `json:"rippleEffect,omitempty"`
	*opts.LineStyle    `json:"lineStyle,omitempty"`
	*opts.AreaStyle    `json:"areaStyle,omitempty"`
	*opts.TextStyle    `json:"textStyle,omitempty"`
}

type Sunburst

type Sunburst struct {
	BaseConfiguration
}

Sunburst represents a sunburst chart.

func NewSunburst

func NewSunburst() *Sunburst

NewSunburst creates a new sunburst chart instance.

func (*Sunburst) AddSeries

func (c *Sunburst) AddSeries(name string, data []opts.SunBurstData, options ...SeriesOpts) *Sunburst

AddSeries adds new data sets.

func (*Sunburst) SetGlobalOptions

func (c *Sunburst) SetGlobalOptions(options ...GlobalOpts) *Sunburst

SetGlobalOptions sets options for the Pie instance.

func (Sunburst) Type

func (Sunburst) Type() string

Type returns the chart type.

func (*Sunburst) Validate

func (c *Sunburst) Validate()

Validate validates the given configuration.

type Surface3D

type Surface3D struct {
	Chart3D
}

Surface3D represents a 3D surface chart.

func NewSurface3D

func NewSurface3D() *Surface3D

NewSurface3D creates a new 3d surface chart.

func (*Surface3D) AddSeries

func (c *Surface3D) AddSeries(name string, data []opts.Chart3DData, options ...SeriesOpts) *Surface3D

AddSeries adds the new series.

func (Surface3D) Type

func (Surface3D) Type() string

Type returns the chart type.

type ThemeRiver

type ThemeRiver struct {
	BaseConfiguration
}

ThemeRiver represents a theme river chart.

func NewThemeRiver

func NewThemeRiver() *ThemeRiver

NewThemeRiver creates a new theme river chart.

func (*ThemeRiver) AddSeries

func (c *ThemeRiver) AddSeries(name string, data []opts.ThemeRiverData, options ...SeriesOpts) *ThemeRiver

AddSeries adds new data sets.

func (*ThemeRiver) SetGlobalOptions

func (c *ThemeRiver) SetGlobalOptions(options ...GlobalOpts) *ThemeRiver

SetGlobalOptions sets options for the ThemeRiver instance.

func (ThemeRiver) Type

func (ThemeRiver) Type() string

Type returns the chart type.

func (*ThemeRiver) Validate

func (c *ThemeRiver) Validate()

Validate

type Tree

type Tree struct {
	BaseConfiguration
}

Tree represents a Tree chart.

func NewTree

func NewTree() *Tree

NewTree creates a new Tree chart instance.

func (*Tree) AddSeries

func (c *Tree) AddSeries(name string, data []opts.TreeData, options ...SeriesOpts) *Tree

func (*Tree) SetGlobalOptions

func (c *Tree) SetGlobalOptions(options ...GlobalOpts) *Tree

SetGlobalOptions sets options for the Graph instance.

func (Tree) Type

func (Tree) Type() string

Type returns the chart type.

func (*Tree) Validate

func (c *Tree) Validate()

Validate validates the given configuration.

type WordCloud

type WordCloud struct {
	BaseConfiguration
}

WordCloud represents a word cloud chart.

func NewWordCloud

func NewWordCloud() *WordCloud

NewWordCloud creates a new word cloud chart.

func (*WordCloud) AddSeries

func (c *WordCloud) AddSeries(name string, data []opts.WordCloudData, options ...SeriesOpts) *WordCloud

AddSeries adds new data sets.

func (*WordCloud) SetGlobalOptions

func (c *WordCloud) SetGlobalOptions(options ...GlobalOpts) *WordCloud

SetGlobalOptions sets options for the WordCloud instance.

func (WordCloud) Type

func (WordCloud) Type() string

Type returns the chart type.

func (*WordCloud) Validate

func (c *WordCloud) Validate()

Validate

type XYAxis

type XYAxis struct {
	XAxisList []opts.XAxis `json:"xaxis"`
	YAxisList []opts.YAxis `json:"yaxis"`
}

XYAxis represent the X and Y axis in the rectangular coordinates.

func (*XYAxis) ExtendXAxis

func (xy *XYAxis) ExtendXAxis(xAxis ...opts.XAxis)

ExtendXAxis adds new X axes.

func (*XYAxis) ExtendYAxis

func (xy *XYAxis) ExtendYAxis(yAxis ...opts.YAxis)

ExtendYAxis adds new Y axes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL