columnchart

package
v2.26.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnChartMaterialPage

func ColumnChartMaterialPage(chart google.Chart) string

func StreamColumnChartMaterialPage

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

func WriteColumnChartMaterialPage

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

Types

type Chart

type Chart struct {
	Title     string
	ChartDiv  string
	DataTable google.DataTable
	Options   *Options
}

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

func (*Chart) ChartDivOrDefault

func (chart *Chart) ChartDivOrDefault() string

func (*Chart) DataTableJSON

func (chart *Chart) DataTableJSON() []byte

func (*Chart) OptionsJSON

func (chart *Chart) OptionsJSON() []byte

func (*Chart) PageTitle

func (chart *Chart) PageTitle() string

func (*Chart) WriteFilePageHTML

func (chart *Chart) WriteFilePageHTML(filename string, perm os.FileMode) error

type IsStacked

type IsStacked string
const (
	IsStackedAbsolute IsStacked = "absolute"
	IsStackedPercent  IsStacked = "percent"
	IsStackedRelative IsStacked = "relative"
	IsStackedDefault  IsStacked = IsStackedAbsolute
)

type Options

type Options struct {
	Chart          OptionsChart  `json:"chart,omitempty"`
	Title          string        `json:"title,omitempty"`
	Subtitle       string        `json:"subtitle,omitempty"`
	Width          uint          `json:"width,omitempty"`
	Height         uint          `json:"height,omitempty"`
	Legend         OptionsLegend `json:"legend,omitempty"`
	Bar            OptionsBar    `json:"bar"`
	IsStacked      IsStacked     `json:"isStacked"`
	HorizontalAxis OptionsHAxis  `json:"hAxis"`
}

func OptionsDefault

func OptionsDefault() Options

func (*Options) MustJSON

func (opts *Options) MustJSON() []byte

type OptionsBar

type OptionsBar struct {
	GroupWidth string `json:"groupWidth,omitempty"` // e.g. "95%"
}

type OptionsChart

type OptionsChart struct {
	Title    string `json:"title"`
	Subtitle string `json:"subtitle"`
}

type OptionsHAxis

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

type OptionsLegend

type OptionsLegend struct {
	Position string `json:"position,omitempty"` // ["none"]
	MaxLines int    `json:"maxLines,omitempty"`
}

Jump to

Keyboard shortcuts

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