types

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Axis

type Axis struct {
	// Title is the title for the axis.
	Title *Text `json:"title,omitempty"`
	// Type can be 'numeric', 'category' or 'datetime'
	Type string `json:"type,omitempty"`
	// Min is the minimum value for the axis.
	Min interface{} `json:"min,omitempty"`
	// Max is the maximum value for the axis.
	Max interface{} `json:"max,omitempty"`
	// MinorInterval is the interval between axis ticks.
	MinorInterval interface{} `json:"minor_interval,omitempty"`
	// MajorInterval is the interval between axis lines.
	MajorInterval interface{} `json:"major_interval,omitempty"`
	// LabelFormat is the format for axis labels.
	LabelFormat *Text `json:"label_format,omitempty"`
	// ZOrder is the ordering of this axis relative to others.
	ZOrder interface{} `json:"z_order,omitempty"`
}

Axis defines an axis for a plot.

type Font

type Font struct {
	Family string      `json:"family,omitempty"`
	Size   interface{} `json:"size,omitempty"`
}

Font contains a font definition.

type Graph

type Graph struct {
	Title *Text   `json:"title,omitempty"`
	XAxis *Axis   `json:"xaxis,omitempty"`
	YAxes []*Axis `json:"yaxes,omitempty"`
	Plots []*Plot `json:"plots,omitempty"`
	Meta  *Meta   `json:"meta,omitempty"`
}

Graph is the top-level structure for a graph.

type Meta

type Meta struct {
	Theme  string  `json:"theme,omitempty"`
	Format string  `json:"format,omitempty"`
	Width  float64 `json:"width,omitempty"`
	Height float64 `json:"height,omitempty"`
	DPI    float64 `json:"dpi,omitempty"`
}

Meta provides metadata for a graph.

type Plot

type Plot struct {
	// YAxis is the number of the Y axis in the graph to which this plot applies.
	YAxis interface{} `json:"yaxis,omitempty"`
	// Style can be 'line', 'bar' or 'stackedbar'.
	Style string `json:"style,omitempty"`
	// Zorder provides ordering for multiple plots.
	ZOrder interface{} `json:"z_order,omitempty"`
	// LineStyle can be 'solid', 'dashed' or 'dotted'.
	LineStyle string `json:"line_style,omitempty"`
	// Name is the name of the data series (shows up in legends).
	Name string `json:"name,omitempty"`
	// Width is the relative width of the bar [0,1]
	Width interface{} `json:"width,omitempty"`
	// Color is the color of the plot.
	Color string `json:"color,omitempty"`
	// Data is the data itself.
	Data [][]interface{} `json:"data"`
}

Plot is details of a single plot.

type Text

type Text struct {
	Label string `json:"label,omitempty"`
	Font  *Font  `json:"font,omitempty"`
}

Text contains text to be displayed.

type Theme

type Theme struct {
	Name string `json:"name"`
}

Theme is a theme for a graph.

Jump to

Keyboard shortcuts

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