jsontoapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrViewIsEmpty contains error message about empty view.
	ErrViewIsEmpty = errors.New("chart view is empty")

	// ErrValuesShouldBeSpecified contains error message about missing values.
	ErrValuesShouldBeSpecified = errors.New("chart view values are not specified")

	// ErrOnlyOneOfValuesKindShouldBeSpecified contains error message about a case when too many values kinds are provided.
	ErrOnlyOneOfValuesKindShouldBeSpecified = errors.New("only one of bars_values, points_values, scalar_values should be specified")

	// ErrBadPointValuesCount contains error message about bad point.
	ErrBadPointValuesCount = fmt.Errorf("each point should have %d values", pointValuesCount)
)
View Source
var ErrOnlyOneOfDomainsShouldBeSpecified = errors.New("only one of domain_numeric or domain_categories should be specified")

ErrOnlyOneOfDomainsShouldBeSpecified contains error message about a case when too many domains are provided.

View Source
var ErrOnlyOneOfHexOrRGBColorShouldBeSpecified = errors.New("color can be only one of hex or rgb")

ErrOnlyOneOfHexOrRGBColorShouldBeSpecified contains error message about bad color value.

Functions

func ChartScaleFromJSON

func ChartScaleFromJSON(scale *view.ChartScale) (*render.ChartScale, error)

ChartScaleFromJSON parses and validates JSON chart scale representation.

func ChartViewFromJSON

func ChartViewFromJSON(jsonView *view.ChartView) (*render.ChartView, error)

ChartViewFromJSON parses and validates chart view JSON representation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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