Documentation
¶
Index ¶
- Constants
- func DemoNames() []string
- func SchemaJSON() []byte
- type AxisSpec
- type Chart
- func (chart *Chart) PNG(options ImageOptions) ([]byte, error)
- func (chart *Chart) ResolvedSpec() Spec
- func (chart *Chart) Spec() Spec
- func (chart *Chart) Terminal(options TerminalOptions) (string, error)
- func (chart *Chart) WriteHTML(writer io.Writer, options HTMLOptions) error
- func (chart *Chart) WriteJSON(writer io.Writer) error
- func (chart *Chart) WritePNG(writer io.Writer, options ImageOptions) error
- func (chart *Chart) WriteSVG(writer io.Writer, options ImageOptions) error
- type Curve
- type Dataset
- type DisplaySpec
- type HTMLOptions
- type ImageOptions
- type Layout
- type Mark
- type Orientation
- type Row
- type SeriesSpec
- type Spec
- type TerminalOptions
- type TerminalSizeError
- type Type
Constants ¶
View Source
const ( DefaultTerminalWidth = 80 DefaultTerminalHeight = 14 MinTerminalWidth = 30 MinTerminalHeight = 8 )
View Source
const MaxInputBytes = 8 << 20
View Source
const SchemaURL = "https://chartmux.dev/schema/v1.json"
View Source
const SpecVersion = 1
Variables ¶
This section is empty.
Functions ¶
func SchemaJSON ¶
func SchemaJSON() []byte
Types ¶
type Chart ¶
type Chart struct {
// contains filtered or unexported fields
}
func (*Chart) ResolvedSpec ¶
type DisplaySpec ¶
type DisplaySpec struct {
Show bool `json:"show"`
}
type HTMLOptions ¶
type ImageOptions ¶
type Orientation ¶
type Orientation string
const ( Vertical Orientation = "vertical" Horizontal Orientation = "horizontal" )
type SeriesSpec ¶
type Spec ¶
type Spec struct {
Schema string `json:"$schema,omitempty"`
Version int `json:"version"`
Type Type `json:"type"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Data []Row `json:"data"`
XAxis AxisSpec `json:"xAxis"`
Series []SeriesSpec `json:"series"`
Layout Layout `json:"layout,omitempty"`
Orientation Orientation `json:"orientation,omitempty"`
Curve Curve `json:"curve,omitempty"`
Legend *DisplaySpec `json:"legend,omitempty"`
Axes *DisplaySpec `json:"axes,omitempty"`
Labels *DisplaySpec `json:"labels,omitempty"`
Theme string `json:"theme,omitempty"`
Bins int `json:"bins,omitempty"`
Max float64 `json:"max,omitempty"`
}
type TerminalOptions ¶
type TerminalSizeError ¶
func (*TerminalSizeError) Error ¶
func (err *TerminalSizeError) Error() string
Click to show internal directories.
Click to hide internal directories.