types

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 2 Imported by: 7 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayOK

type ArrayOK[T any] struct {
	Value T
	Array []T
}

ArrayOK is a type that allows you to define a single value or an array of values, But not both. If Array is defined, Value will be ignored.

func ArrayOKArray

func ArrayOKArray[T any](array ...T) *ArrayOK[*T]

func ArrayOKValue

func ArrayOKValue[T any](value T) *ArrayOK[*T]

func (*ArrayOK[T]) MarshalJSON

func (arrayOK *ArrayOK[T]) MarshalJSON() ([]byte, error)

func (*ArrayOK[T]) UnmarshalJSON

func (arrayOK *ArrayOK[T]) UnmarshalJSON(data []byte) error

type Bool

type Bool *bool

Bool represents a *bool value. Needed to tell the different between false and nil.

var (

	// True is a *bool with true value
	True Bool = &trueValue
	// False is a *bool with false value
	False Bool = &falseValue
)

type Color

type Color string

Color A string describing color. Supported formats: - hex (e.g. '#d3d3d3') - rgb (e.g. 'rgb(255, 0, 0)') - rgba (e.g. 'rgb(255, 0, 0, 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)') - hsv (e.g. 'hsv(0, 100%, 100%)') - named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)",

type ColorList

type ColorList []Color

ColorList A list of colors. Must be an {array} containing valid colors.

type ColorScale

type ColorScale struct {
	Name   string
	Values []ColorScaleReference
}

ColorScale A Plotly colorscale either picked by a name: (any of Greys, YlGnBu, Greens, YlOrRd, Bluered, RdBu, Reds, Blues, Picnic, Rainbow, Portland, Jet, Hot, Blackbody, Earth, Electric, Viridis, Cividis ) customized as an {array} of 2-element {arrays} where the first element is the normalized color level value (starting at *0* and ending at *1*), and the second item is a valid color string.

func (*ColorScale) MarshalJSON

func (cs *ColorScale) MarshalJSON() ([]byte, error)

func (*ColorScale) UnmarshalJSON

func (cs *ColorScale) UnmarshalJSON(data []byte) error

type ColorScaleReference

type ColorScaleReference struct {
	NormalizedValue float64
	Color           Color
}

func (*ColorScaleReference) MarshalJSON

func (cs *ColorScaleReference) MarshalJSON() ([]byte, error)

type ColorWithColorScale

type ColorWithColorScale struct {
	Color *Color
	Value float64
}

func UseColor

func UseColor(in Color) ColorWithColorScale

func UseColorScaleValues

func UseColorScaleValues(in []float64) []ColorWithColorScale

func UseColors

func UseColors(in []Color) []ColorWithColorScale

func (*ColorWithColorScale) MarshalJSON

func (c *ColorWithColorScale) MarshalJSON() ([]byte, error)

func (*ColorWithColorScale) UnmarshalJSON

func (c *ColorWithColorScale) UnmarshalJSON(data []byte) error

type Fig

type Fig interface {
	Info() Version
}

Fig Represents a plotly figure use the Info method to get details about the plotly version

type String

type String interface{}

String is a string value, can be a []string if arrayOK is true. numeric values are converted to string by plotly, so []<number> can work

type Trace

type Trace interface {
	GetType() TraceType
}

Trace Every trace implements this interface It is useful for autocompletion, it is a better idea to use type assertions/switches to identify trace types

type TraceType

type TraceType string

TraceType is the type for the TraceType field on every trace

type Version

type Version struct {
	Name      string `yaml:"Name"`      // name of the version
	Tag       string `yaml:"Tag"`       // git tag of the plotly version
	URL       string `yaml:"URL"`       // url under which the plotly schema json file can be downloaded directly
	Path      string `yaml:"Path"`      // path under which the schema file will be saved locally for future use
	Generated string `yaml:"Generated"` // path for the generated package
	Cdn       string `yaml:"CDN"`       // url for the cdn which should be included in the head of the generated html
}

Jump to

Keyboard shortcuts

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