chartjs

package
v0.0.0-...-c9cf022 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Red    = "rgb(255, 99, 132)"
	Orange = "rgb(255, 159, 64)"
	Yellow = "rgb(255, 205, 86)"
	Green  = "rgb(75, 192, 192)"
	Blue   = "rgb(54, 162, 235)"
	Purple = "rgb(153, 102, 255)"
	Grey   = "rgb(201, 203, 207)"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LineData

type LineData struct {
	// contains filtered or unexported fields
}

func NewLineData

func NewLineData(name string, backgroundColor string, borderColor string, fill bool, max int) *LineData

func (*LineData) Add

func (ld *LineData) Add(x string, y int)

func (*LineData) AddValue

func (ld *LineData) AddValue(v int)

func (*LineData) AutoAdd

func (ld *LineData) AutoAdd()

func (*LineData) Export

func (ld *LineData) Export() string

type LineDataEle

type LineDataEle struct {
	// contains filtered or unexported fields
}

type LineDataExport

type LineDataExport struct {
	Labels   []string            `json:"labels"`
	Datasets []LineDataExportSet `json:"datasets"`
}

type LineDataExportSet

type LineDataExportSet struct {
	Label           string `json:"label"`
	BackgroundColor string `json:"backgroundColor"`
	BorderColor     string `json:"borderColor"`
	Data            []int  `json:"data"`
	Fill            bool   `json:"fill"`
}

Jump to

Keyboard shortcuts

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