Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnmarshalTrace ¶
func UnmarshalTrace(json.RawMessage) (types.Trace, error)
Types ¶
type Fig ¶
type Fig struct {
// Data The data to be plotted is described in an array usually called data, whose elements are trace objects of various types (e.g. scatter, bar etc) as documented in the Full Reference.
// https://plotly.com/javascript/reference
Data []types.Trace `json:"data,omitempty"`
// Layout The layout of the plot – non-data-related visual attributes such as the title, annotations etc – is described in an object usually called layout, as documented in/ the Full Reference.
// https://plotly.com/javascript/reference/layout
Layout *Layout `json:"layout,omitempty"`
// Config High-level configuration options for the plot, such as the scroll/zoom/hover behaviour, is described in an object usually called config, as documented here. The difference between config and layout is that layout relates to the content of the plot, whereas config relates to the context in which the plot is being shown.
// https://plotly.com/javascript/configuration-options
Config *Config `json:"config,omitempty"`
// Animation is not yet implemented, feel free to insert custom a struct
Animation interface{} `json:"animation,omitempty"`
}
Fig is the base type for figures.
func (*Fig) AddTraces ¶
AddTraces Is a shorthand to add figures to a given figure. It handles the case where the Traces value is nil.
func (*Fig) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshal function to properly handle special cases.
Click to show internal directories.
Click to hide internal directories.