barchart

package
v2.19.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IsStackedAbsolute = "absolute"
	IsStackedPercent  = "percent"
	IsStackedRelative = "relative"
)

Variables

This section is empty.

Functions

func BarChartMaterialPage

func BarChartMaterialPage(chart google.Chart) string

func StreamBarChartMaterialPage

func StreamBarChartMaterialPage(qw422016 *qt422016.Writer, chart google.Chart)

func TimeSeriesSetToDataTable

func TimeSeriesSetToDataTable(name string, sets []string, set timeseries.TimeSeriesSet) (google.DataTable, error)

func WriteBarChartMaterialPage

func WriteBarChartMaterialPage(qq422016 qtio422016.Writer, chart google.Chart)

Types

type BarChartMaterial

type BarChartMaterial struct {
	Title     string
	ChartDiv  string
	DataTable google.DataTable
	Options   BarChartOptions
}

BarChartMaterial represents the chart at: https://developers-dot-devsite-v2-prod.appspot.com/chart/interactive/docs/gallery/barchart

func (BarChartMaterial) ChartDivOrDefault

func (chart BarChartMaterial) ChartDivOrDefault() string

func (BarChartMaterial) DataTableJSON

func (chart BarChartMaterial) DataTableJSON() []byte

func (BarChartMaterial) OptionsJSON

func (chart BarChartMaterial) OptionsJSON() []byte

func (BarChartMaterial) PageTitle

func (chart BarChartMaterial) PageTitle() string

func (BarChartMaterial) WritePageHTML

func (chart BarChartMaterial) WritePageHTML(filename string, perm os.FileMode) error

type BarChartOptions

type BarChartOptions struct {
	Width          uint                  `json:"width"`
	Height         uint                  `json:"height"`
	Legend         BarChartOptionsLegend `json:"legend,omitempty"`
	Bar            BarChartOptionsBar    `json:"bar"`
	IsStacked      string                `json:"isStacked"`
	HorizontalAxis BarChartOptionsHAxis  `json:"hAxis"`
}

func BarChartOptionsDefault

func BarChartOptionsDefault() BarChartOptions

func (BarChartOptions) MustJSON

func (opts BarChartOptions) MustJSON() []byte

type BarChartOptionsBar

type BarChartOptionsBar struct {
	GroupWidth string `json:"groupWidth,omitempty"`
}

type BarChartOptionsHAxis

type BarChartOptionsHAxis struct {
	MinValue int   `json:"minValue"`
	Ticks    []int `json:"ticks"`
}

type BarChartOptionsLegend

type BarChartOptionsLegend struct {
	Position string `json:"position,omitempty"`
	MaxLines int    `json:"maxLines,omitempty"`
}

Jump to

Keyboard shortcuts

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