chartbuilder

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package chartbuilder provides a chart builder for rending themed Fyne charts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartBuilder

type ChartBuilder struct {
	// Parameters must be set before calling Render to customize.
	ForegroundColor color.Color
	BackgroundColor color.Color
	Font            *truetype.Font
}

CharBuilder renders themed Fyne charts.

func New

func New() ChartBuilder

New returns a new ChartBuilder object.

The builder can be customized by setting it's exported fields.

func (ChartBuilder) Render

func (cb ChartBuilder) Render(ct ChartType, title string, values []Value) *fyne.Container

Render returns a rendered chart in a Fyne container.

type ChartType

type ChartType uint
const (
	Pie ChartType = iota
	Bar
)

type Value

type Value struct {
	Label string
	Value float64
}

Jump to

Keyboard shortcuts

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