Movatterモバイル変換


[0]ホーム

URL:


wchart

package
v2.26.5Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License:MITImports:19Imported by:3

Details

Repository

github.com/grokify/gocharts

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (// ColorOrange is orange.ColorOrange =drawing.Color{R: 255, G: 165, B: 0, A: 255}// ColorGreen is green.ColorGreen =drawing.Color{R: 0, G: 255, B: 0, A: 255})

Functions

funcColorImageToDrawing

func ColorImageToDrawing(colcolor.RGBA)drawing.Color

ColorImageToDrawing converts a `color.RGBA` valueto a `drawing.Color` value.

funcGridLines

func GridLines(values []float64, stylechartdraw.Style) []chartdraw.GridLine

GridLines creates a `[]chartdraw.GridLine` from a slice of `int64`and a style.

funcMustParseColor

func MustParseColor(colorNamestring)drawing.Color

MustParseColor returns a `drawing.Color` for theSVG color name. If the color name is not found,black is returned.

funcParseColor

func ParseColor(colorNamestring) (drawing.Color,error)

ParseColor returns a `drawing.Color` for theSVG color name. If the color name is not found,an error is returned.

funcTSSToChart

TSSToChart converts a `TimeSeriesSet` to a `wcharczuk.Chart`.

funcTicks

func Ticks(tickValues []float64, fnstrconvutil.Float64ToString) []chartdraw.Tick

Ticks converts a slice of `float64` to a slice of `chartdraw.Tick`. Commonformatting functions include `strconvutil.Commify` and`strconvutil.Int64Abbreviation`.

funcTicksAndGridlinesTime

func TicksAndGridlinesTime(intervaltimeutil.Interval, timeStart, timeEndtime.Time, styleMajor, styleMinorchartdraw.Style, timeFormat func(time.Time)string, tickInterval, gridIntervaltimeutil.Interval) ([]chartdraw.Tick, []chartdraw.GridLine,error)

TicksAndGridlinesTime takes a start and end time and converts it to`[]chartdraw.Tick` and `[]chartdraw.GridLine.`.

funcTicksInt64

func TicksInt64(tickValues []int64, fnstrconvutil.Int64ToString) []chartdraw.Tick

TicksInt64 converts a slice of `int64` to a slice of `chartdraw.Tick`. Commonformatting functions include `strconvutil.Commify` and`strconvutil.Int64Abbreviation`.

funcTimeSeriesMapToContinuousSeriesMonths

func TimeSeriesMapToContinuousSeriesMonths(dsm map[string]timeseries.TimeSeries, order []string) ([]chartdraw.ContinuousSeries,error)

funcTimeSeriesMapToContinuousSeriesQuarters

func TimeSeriesMapToContinuousSeriesQuarters(dsm map[string]timeseries.TimeSeries, order []string) ([]chartdraw.ContinuousSeries,error)

funcWritePNG

func WritePNG(wio.Writer, cChartType)error

funcWritePNGFileadded inv2.18.1

func WritePNGFile(filenamestring, cChartType)error

Types

typeChartOptions

type ChartOptions struct {LegendEnableboolYAxisLeftboolXAxisTimeLayoutstring}

typeChartType

type ChartType interface {Render(rpchartdraw.RendererProvider, wio.Writer)error}

typeColors

type Colors struct {BackgroundColorValdrawing.ColorBackgroundStrokeColorValdrawing.ColorCanvasColorValdrawing.ColorCanvasStrokeColorValdrawing.ColorAxisStrokeColorValdrawing.ColorTextColorValdrawing.ColorSeriesColorValdrawing.Color}

funcColorsDefault

func ColorsDefault()Colors

func (Colors)AxisStrokeColor

func (cColors) AxisStrokeColor()drawing.Color

func (Colors)BackgroundColor

func (cColors) BackgroundColor()drawing.Color

func (Colors)BackgroundStrokeColor

func (cColors) BackgroundStrokeColor()drawing.Color

func (Colors)CanvasColor

func (cColors) CanvasColor()drawing.Color

func (Colors)CanvasStrokeColor

func (cColors) CanvasStrokeColor()drawing.Color

func (Colors)GetSeriesColor

func (cColors) GetSeriesColor(indexint)drawing.Color

func (Colors)TextColor

func (cColors) TextColor()drawing.Color

typeTableadded inv2.18.0

type Table struct {Table *tablef64.Table}

func (*Table)BoxPlotadded inv2.18.0

func (tbl *Table) BoxPlot(values []float64) (*plotter.BoxPlot,error)

func (*Table)BoxPlotColNameWritePNGFileadded inv2.18.0

func (tbl *Table) BoxPlotColNameWritePNGFile(filename, title, colNamestring)error

func (*Table)ScatterPlotadded inv2.18.0

func (tbl *Table) ScatterPlot(title, xColName, yColNamestring, dotWidthfloat64) (chartdraw.Chart,error)

func (*Table)ScatterPlotWritePNGadded inv2.18.1

func (tbl *Table) ScatterPlotWritePNG(wio.Writer, title, xColName, yColNamestring, dotWidthfloat64)error

func (*Table)ScatterPlotWritePNGFileadded inv2.18.0

func (tbl *Table) ScatterPlotWritePNGFile(filename, title, xColName, yColNamestring, dotWidthfloat64)error

typeTimeFormatter

type TimeFormatter struct {Layoutstring// time format string}

TimeFormatter provides a struct that satisifies the`github.com/wcharczuk/go-chart.ValueFormatter` interfaceusing a given time layout string.

func (*TimeFormatter)FormatTime

func (tvf *TimeFormatter) FormatTime(vany)string

Source Files

View all Source files

Directories

PathSynopsis
examples
barcommand
linecommand
twoaxiscommand

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp