wchart
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Variables
- func ColorImageToDrawing(col color.RGBA) drawing.Color
- func GridLines(values []float64, style chartdraw.Style) []chartdraw.GridLine
- func MustParseColor(colorName string) drawing.Color
- func ParseColor(colorName string) (drawing.Color, error)
- func TSSToChart(data timeseries.TimeSeriesSet, opts ChartOptions) chartdraw.Chart
- func Ticks(tickValues []float64, fn strconvutil.Float64ToString) []chartdraw.Tick
- func TicksAndGridlinesTime(interval timeutil.Interval, timeStart, timeEnd time.Time, ...) ([]chartdraw.Tick, []chartdraw.GridLine, error)
- func TicksInt64(tickValues []int64, fn strconvutil.Int64ToString) []chartdraw.Tick
- func TimeSeriesMapToContinuousSeriesMonths(dsm map[string]timeseries.TimeSeries, order []string) ([]chartdraw.ContinuousSeries, error)
- func TimeSeriesMapToContinuousSeriesQuarters(dsm map[string]timeseries.TimeSeries, order []string) ([]chartdraw.ContinuousSeries, error)
- func TimeSeriesToContinuousSeries(ds timeseries.TimeSeries) (chartdraw.ContinuousSeries, error)
- func TimeSeriesToContinuousSeriesQuarter(ds timeseries.TimeSeries) (chartdraw.ContinuousSeries, error)
- func WritePNG(w io.Writer, c ChartType) error
- func WritePNGFile(filename string, c ChartType) error
- type ChartOptions
- type ChartType
- type Colors
- func (c Colors) AxisStrokeColor() drawing.Color
- func (c Colors) BackgroundColor() drawing.Color
- func (c Colors) BackgroundStrokeColor() drawing.Color
- func (c Colors) CanvasColor() drawing.Color
- func (c Colors) CanvasStrokeColor() drawing.Color
- func (c Colors) GetSeriesColor(index int) drawing.Color
- func (c Colors) TextColor() drawing.Color
- type Table
- func (tbl *Table) BoxPlot(values []float64) (*plotter.BoxPlot, error)
- func (tbl *Table) BoxPlotColNameWritePNGFile(filename, title, colName string) error
- func (tbl *Table) ScatterPlot(title, xColName, yColName string, dotWidth float64) (chartdraw.Chart, error)
- func (tbl *Table) ScatterPlotWritePNG(w io.Writer, title, xColName, yColName string, dotWidth float64) error
- func (tbl *Table) ScatterPlotWritePNGFile(filename, title, xColName, yColName string, dotWidth float64) error
- type TimeFormatter
Constants¶
This section is empty.
Variables¶
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¶
ColorImageToDrawing converts a `color.RGBA` valueto a `drawing.Color` value.
funcMustParseColor¶
MustParseColor returns a `drawing.Color` for theSVG color name. If the color name is not found,black is returned.
funcParseColor¶
ParseColor returns a `drawing.Color` for theSVG color name. If the color name is not found,an error is returned.
funcTSSToChart¶
func TSSToChart(datatimeseries.TimeSeriesSet, optsChartOptions)chartdraw.Chart
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)
funcTimeSeriesToContinuousSeries¶
func TimeSeriesToContinuousSeries(dstimeseries.TimeSeries) (chartdraw.ContinuousSeries,error)
funcTimeSeriesToContinuousSeriesQuarter¶
func TimeSeriesToContinuousSeriesQuarter(dstimeseries.TimeSeries) (chartdraw.ContinuousSeries,error)
funcWritePNGFile¶added inv2.18.1
Types¶
typeChartOptions¶
typeColors¶
type Colors struct {BackgroundColorValdrawing.ColorBackgroundStrokeColorValdrawing.ColorCanvasColorValdrawing.ColorCanvasStrokeColorValdrawing.ColorAxisStrokeColorValdrawing.ColorTextColorValdrawing.ColorSeriesColorValdrawing.Color}funcColorsDefault¶
func ColorsDefault()Colors
func (Colors)AxisStrokeColor¶
func (Colors)BackgroundColor¶
func (Colors)BackgroundStrokeColor¶
func (Colors)CanvasColor¶
func (Colors)CanvasStrokeColor¶
typeTable¶added inv2.18.0
func (*Table)BoxPlotColNameWritePNGFile¶added inv2.18.0
func (*Table)ScatterPlot¶added inv2.18.0
func (*Table)ScatterPlotWritePNG¶added inv2.18.1
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