svgchart

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 6 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

svg-charts

Documentation

Index

Constants

View Source
const (
	AlignmentLeft   = core.AlignmentLeft
	AlignmentRight  = core.AlignmentRight
	AlignmentCenter = core.AlignmentCenter
)

Variables

This section is empty.

Functions

func SeriesData

func SeriesData(data ...interface{}) []interface{}

Types

type AxisOptions

type AxisOptions struct {
	Title string
}

AxisOptions for chart

type ChartOptions

type ChartOptions struct {
	Type       string
	Height     int
	Width      int
	BackGround string
}

ChartOptions for specified type

func (*ChartOptions) ChartType

func (option *ChartOptions) ChartType() (core.ChartType, error)

type LabelOptions

type LabelOptions struct {
	FontSize int
	Color    string
}

type LegendOptions

type LegendOptions struct {
	Position core.Position
	Hide     bool
}

LegendOptions for series

type Options

type Options struct {
	// Series of data
	Series      []*SeriesOption
	Labels      []string
	LabelOption *LabelOptions
	// Series color
	Colors []string
	Chart  *ChartOptions
	Title  *TitleOptions
	Legend *LegendOptions
	XAxis  *AxisOptions
	YAxis  *AxisOptions
}

Options of the chart

type SVGChart

type SVGChart struct {
	// contains filtered or unexported fields
}

func NewSVGChart

func NewSVGChart(options Options) (*SVGChart, error)

func (*SVGChart) Render

func (svg *SVGChart) Render(w io.Writer) error

type SeriesOption

type SeriesOption struct {
	Name   string
	Data   []interface{}
	Colors []string
}

type TitleOptions

type TitleOptions struct {
	Text      string
	Alignment core.Alignment
	FontSize  int
	Hide      bool
}

Directories

Path Synopsis
_examples
treemap command
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
modules

Jump to

Keyboard shortcuts

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