barchart

package
v2.21.8 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func BarChartMaterialPage

func BarChartMaterialPage(chart google.Chart) string

func DataTableFromHistogram added in v2.20.0

func DataTableFromHistogram(h *histogram.Histogram, inclUnordered, inclZeroCount, inclZeroCountTail bool) (google.DataTable, error)

func DataTableFromTimeSeriesSet added in v2.20.0

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

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

func StreamBarChartMaterialPage

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

func WriteBarChartMaterialPage

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

Types

type Chart added in v2.20.0

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 added in v2.20.0

func (chart *Chart) ChartDivOrDefault() string

func (*Chart) DataTableJSON added in v2.20.0

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

func (*Chart) OptionsJSON added in v2.20.0

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

func (*Chart) PageTitle added in v2.20.0

func (chart *Chart) PageTitle() string

func (*Chart) WriteFilePageHTML added in v2.20.2

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

type Options added in v2.20.0

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

func OptionsDefault added in v2.20.0

func OptionsDefault() Options

func (*Options) MustJSON added in v2.20.0

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

type OptionsBar added in v2.20.0

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

type OptionsHAxis added in v2.20.0

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

type OptionsLegend added in v2.20.0

type OptionsLegend 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