linechart

package
v2.20.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LineChartMaterialPage

func LineChartMaterialPage(chart Chart) string

func LineChartPage added in v2.20.0

func LineChartPage(chart google.Chart) string

func StreamLineChartMaterialPage

func StreamLineChartMaterialPage(qw422016 *qt422016.Writer, chart Chart)

func StreamLineChartPage added in v2.20.0

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

func TimeSeriesSetToLineChartMaterial

func TimeSeriesSetToLineChartMaterial(tss *timeseries.TimeSeriesSet, fn func(t time.Time) string) ([]google.Column, [][]any, error)

func WriteLineChartMaterialPage

func WriteLineChartMaterialPage(qq422016 qtio422016.Writer, chart Chart)

func WriteLineChartPage added in v2.20.0

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

Types

type Chart added in v2.20.0

type Chart struct {
	Title         string
	Subtitle      string
	ChartDiv      string
	Width         int
	Height        int
	Columns       []google.Column
	Data          google.DataTable
	GoogleOptions *Options
}

Chart provides data for Google Material Line Charts described here: https://developers.google.com/chart/interactive/docs/gallery/linechart#examples

func ChartFromTimeSeriesSet added in v2.20.0

func ChartFromTimeSeriesSet(tss timeseries.TimeSeriesSet, yearLabel string) (Chart, error)

func NewChart added in v2.20.0

func NewChart() Chart

func (*Chart) ChartDivOrDefault added in v2.20.0

func (chart *Chart) ChartDivOrDefault() string

func (*Chart) DataMatrixJSON added in v2.20.0

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

func (*Chart) DataTableJSON added in v2.20.0

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

func (*Chart) LoadTimeSeriesSetMonth added in v2.20.0

func (chart *Chart) LoadTimeSeriesSetMonth(tss *timeseries.TimeSeriesSet, fn func(t time.Time) string) error

func (*Chart) OptionsJSON added in v2.20.0

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

func (*Chart) PageHTML added in v2.20.0

func (chart *Chart) PageHTML() string

func (*Chart) PageTitle added in v2.20.0

func (chart *Chart) PageTitle() string

func (*Chart) WriteFilePage added in v2.20.0

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

type Options added in v2.20.0

type Options struct {
	Chart  OptionsChart `json:"chart,omitempty"`
	Height uint         `json:"height,omitempty"`
	Width  uint         `json:"width,omitempty"`
}

func (*Options) Inflate added in v2.20.0

func (opts *Options) Inflate()

func (*Options) MustJSON added in v2.20.0

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

type OptionsChart added in v2.20.0

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

Jump to

Keyboard shortcuts

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