Versions in this module Expand all Collapse all v2 v2.2.0 Sep 6, 2024 Changes in this version + const ContentTypePNG + const ContentTypeSVG + const DefaultAnnotationDeltaWidth + const DefaultAnnotationFontSize + const DefaultAxisFontSize + const DefaultAxisLineWidth + const DefaultBackgroundStrokeWidth + const DefaultBarSpacing + const DefaultBarWidth + const DefaultCanvasStrokeWidth + const DefaultChartHeight + const DefaultChartWidth + const DefaultDPI + const DefaultDateFormat + const DefaultDateHourFormat + const DefaultDateMinuteFormat + const DefaultDotWidth + const DefaultEMAPeriod + const DefaultFloatFormat + const DefaultFontSize + const DefaultHorizontalTickWidth + const DefaultLineSpacing + const DefaultMACDPeriodPrimary + const DefaultMACDPeriodSecondary + const DefaultMACDSignalPeriod + const DefaultMinimumFontSize + const DefaultMinimumTickHorizontalSpacing + const DefaultMinimumTickVerticalSpacing + const DefaultPercentValueFormat + const DefaultSeriesLineWidth + const DefaultSimpleMovingAveragePeriod + const DefaultStrokeWidth + const DefaultTickCount + const DefaultTickCountSanityCheck + const DefaultTitleFontSize + const DefaultTitleTop + const DefaultVerticalTickHeight + const DefaultXAxisMargin + const DefaultYAxisMargin + const Disabled + const SecondsPerDay + const SecondsPerHour + var AlternateColorPalette alternateColorPalette + var BoxZero = Box + var ColorAlternateBlue = drawing.Color + var ColorAlternateGray = drawing.Color + var ColorAlternateGreen = drawing.Color + var ColorAlternateLightGray = drawing.Color + var ColorAlternateYellow = drawing.Color + var ColorBlack = drawing.Color + var ColorBlue = drawing.Color + var ColorCyan = drawing.Color + var ColorGreen = drawing.Color + var ColorLightGray = drawing.Color + var ColorOrange = drawing.Color + var ColorRed = drawing.Color + var ColorTransparent = drawing.Color + var ColorWhite = drawing.Color + var ColorYellow = drawing.Color + var DashArrayDashesLarge = []int + var DashArrayDashesMedium = []int + var DashArrayDashesSmall = []int + var DashArrayDots = []int + var DefaultAlternateColors = []drawing.Color + var DefaultAnnotationFillColor = ColorWhite + var DefaultAnnotationPadding = Box + var DefaultAxisColor = ColorBlack + var DefaultBackgroundColor = ColorWhite + var DefaultBackgroundPadding = Box + var DefaultBackgroundStrokeColor = ColorWhite + var DefaultCanvasColor = ColorWhite + var DefaultCanvasStrokeColor = ColorWhite + var DefaultColorPalette defaultColorPalette + var DefaultColors = []drawing.Color + var DefaultFillColor = ColorBlue + var DefaultGridLineColor = ColorLightGray + var DefaultStrokeColor = ColorLightGray + var DefaultTextColor = ColorBlack + var Draw = &draw + var Text = &text + func AbsInt(value int) int + func CirclePoint(cx, cy int, radius, thetaRadians float64) (x, y int) + func Days(days int) []time.Time + func Debug(log Logger, arguments ...interface{}) + func Debugf(log Logger, format string, arguments ...interface{}) + func DegreesAdd(baseDegrees, deltaDegrees float64) float64 + func DegreesToCompass(deg float64) float64 + func DegreesToRadians(degrees float64) float64 + func DiffHours(t1, t2 time.Time) (hours int) + func ExponentialValueFormatter(v interface{}) string + func FloatValueFormatter(v interface{}) string + func FloatValueFormatterWithFormat(v interface{}, floatFormat string) string + func GetAlternateColor(index int) drawing.Color + func GetDefaultColor(index int) drawing.Color + func GetDefaultFont() (*truetype.Font, error) + func GetRoundToForDelta(delta float64) float64 + func Hours(start time.Time, totalHours int) []time.Time + func HoursFilled(xdata []time.Time, ydata []float64) ([]time.Time, []float64) + func Info(log Logger, arguments ...interface{}) + func Infof(log Logger, format string, arguments ...interface{}) + func IntValueFormatter(v interface{}) string + func Jet(v, vmin, vmax float64) drawing.Color + func LinearRange(start, end float64) []float64 + func LinearRangeWithStep(start, end, step float64) []float64 + func MaxInt(values ...int) (max int) + func Mean(values ...float64) float64 + func MeanInt(values ...int) int + func MinInt(values ...int) (min int) + func MinMax(values ...float64) (min, max float64) + func Normalize(values ...float64) []float64 + func ParseFloats(values ...string) ([]float64, error) + func ParseTimes(layout string, values ...string) ([]time.Time, error) + func PercentDifference(v1, v2 float64) float64 + func PercentToRadians(pct float64) float64 + func PercentValueFormatter(v interface{}) string + func RadianAdd(base, delta float64) float64 + func RadiansToDegrees(value float64) float64 + func RandomValues(count int) []float64 + func RandomValuesWithMax(count int, max float64) []float64 + func ReadChunks(filePath string, chunkSize int, handler func([]byte) error) error + func ReadLines(filePath string, handler func(string) error) error + func RotateCoordinate(cx, cy, x, y int, thetaRadians float64) (rx, ry int) + func RoundDown(value, roundTo float64) float64 + func RoundPlaces(input float64, places int) (rounded float64) + func RoundUp(value, roundTo float64) float64 + func SVGWithCSS(css string, nonce string) func(width, height int) (Renderer, error) + func SplitCSV(text string) (output []string) + func Sum(values ...float64) float64 + func SumInt(values ...int) int + func TimeDateValueFormatter(v interface{}) string + func TimeFromFloat64(tf float64) time.Time + func TimeHourValueFormatter(v interface{}) string + func TimeMax(times ...time.Time) (max time.Time) + func TimeMillis(d time.Duration) float64 + func TimeMin(times ...time.Time) (min time.Time) + func TimeMinMax(times ...time.Time) (min, max time.Time) + func TimeMinuteValueFormatter(v interface{}) string + func TimeToFloat64(t time.Time) float64 + func TimeValueFormatter(v interface{}) string + func ToFloat64(t time.Time) float64 + func Viridis(v, vmin, vmax float64) drawing.Color + type AnnotationSeries struct + Annotations []Value2 + Name string + Style Style + YAxis YAxisType + func BoundedLastValuesAnnotationSeries(innerSeries FullBoundedValuesProvider, vfs ...ValueFormatter) AnnotationSeries + func FirstValueAnnotation(innerSeries ValuesProvider, vfs ...ValueFormatter) AnnotationSeries + func LastValueAnnotationSeries(innerSeries ValuesProvider, vfs ...ValueFormatter) AnnotationSeries + func (as AnnotationSeries) GetName() string + func (as AnnotationSeries) GetStyle() Style + func (as AnnotationSeries) GetYAxis() YAxisType + func (as AnnotationSeries) Measure(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) Box + func (as AnnotationSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (as AnnotationSeries) Validate() error + type Array []float64 + func NewArray(values ...float64) Array + func (a Array) GetValue(index int) float64 + func (a Array) Len() int + type Axis interface + GenerateTicks func(r Renderer, ra Range, vf ValueFormatter) []Tick + GetGridLines func(ticks []Tick) []GridLine + GetName func() string + GetStyle func() Style + GetTicks func() []Tick + Measure func(r Renderer, canvasBox Box, ra Range, style Style, ticks []Tick) Box + Render func(r Renderer, canvasBox Box, ra Range, style Style, ticks []Tick) + SetName func(name string) + SetStyle func(style Style) + type BarChart struct + Background Style + BarSpacing int + BarWidth int + Bars []Value + BaseValue float64 + Canvas Style + ColorPalette ColorPalette + DPI float64 + Elements []Renderable + Font *truetype.Font + Height int + Title string + TitleStyle Style + UseBaseValue bool + Width int + XAxis Style + YAxis YAxis + func (bc BarChart) GetBarSpacing() int + func (bc BarChart) GetBarWidth() int + func (bc BarChart) GetColorPalette() ColorPalette + func (bc BarChart) GetDPI() float64 + func (bc BarChart) GetFont() *truetype.Font + func (bc BarChart) GetHeight() int + func (bc BarChart) GetWidth() int + func (bc BarChart) Render(rp RendererProvider, w io.Writer) error + type BollingerBandsSeries struct + InnerSeries ValuesProvider + K float64 + Name string + Period int + Style Style + YAxis YAxisType + func (bbs *BollingerBandsSeries) GetBoundedLastValues() (x, y1, y2 float64) + func (bbs *BollingerBandsSeries) GetBoundedValues(index int) (x, y1, y2 float64) + func (bbs *BollingerBandsSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (bbs BollingerBandsSeries) GetK(defaults ...float64) float64 + func (bbs BollingerBandsSeries) GetName() string + func (bbs BollingerBandsSeries) GetPeriod() int + func (bbs BollingerBandsSeries) GetStyle() Style + func (bbs BollingerBandsSeries) GetYAxis() YAxisType + func (bbs BollingerBandsSeries) Len() int + func (bbs BollingerBandsSeries) Validate() error + type BoundedLastValuesProvider interface + GetBoundedLastValues func() (x, y1, y2 float64) + type BoundedValuesProvider interface + GetBoundedValues func(index int) (x, y1, y2 float64) + Len func() int + type Box struct + Bottom int + IsSet bool + Left int + Right int + Top int + func NewBox(top, left, right, bottom int) Box + func (b Box) Aspect() float64 + func (b Box) Center() (x, y int) + func (b Box) Clone() Box + func (b Box) Constrain(other Box) Box + func (b Box) Corners() BoxCorners + func (b Box) Equals(other Box) bool + func (b Box) Fit(other Box) Box + func (b Box) GetBottom(defaults ...int) int + func (b Box) GetLeft(defaults ...int) int + func (b Box) GetRight(defaults ...int) int + func (b Box) GetTop(defaults ...int) int + func (b Box) Grow(other Box) Box + func (b Box) Height() int + func (b Box) IsBiggerThan(other Box) bool + func (b Box) IsSmallerThan(other Box) bool + func (b Box) IsZero() bool + func (b Box) OuterConstrain(bounds, other Box) Box + func (b Box) Shift(x, y int) Box + func (b Box) String() string + func (b Box) Validate() error + func (b Box) Width() int + type BoxCorners struct + BottomLeft Point + BottomRight Point + TopLeft Point + TopRight Point + func (bc BoxCorners) Box() Box + func (bc BoxCorners) Center() (x, y int) + func (bc BoxCorners) Equals(other BoxCorners) bool + func (bc BoxCorners) Height() int + func (bc BoxCorners) Rotate(thetaDegrees float64) BoxCorners + func (bc BoxCorners) String() string + func (bc BoxCorners) Width() int + type Chart struct + Background Style + Canvas Style + ColorPalette ColorPalette + DPI float64 + Elements []Renderable + Font *truetype.Font + Height int + Log Logger + Series []Series + Title string + TitleStyle Style + Width int + XAxis XAxis + YAxis YAxis + YAxisSecondary YAxis + func (c Chart) Box() Box + func (c Chart) GetColorPalette() ColorPalette + func (c Chart) GetDPI(defaults ...float64) float64 + func (c Chart) GetFont() *truetype.Font + func (c Chart) GetHeight() int + func (c Chart) GetWidth() int + func (c Chart) Render(rp RendererProvider, w io.Writer) error + type ColorPalette interface + AxisStrokeColor func() drawing.Color + BackgroundColor func() drawing.Color + BackgroundStrokeColor func() drawing.Color + CanvasColor func() drawing.Color + CanvasStrokeColor func() drawing.Color + GetSeriesColor func(index int) drawing.Color + TextColor func() drawing.Color + type ColorProvider func(v, vmin, vmax float64) drawing.Color + type ConcatSeries []Series + func (cs ConcatSeries) GetValue(index int) (x, y float64) + func (cs ConcatSeries) Len() int + func (cs ConcatSeries) Validate() error + type ContinuousRange struct + Descending bool + Domain int + Max float64 + Min float64 + func (r *ContinuousRange) SetDomain(domain int) + func (r *ContinuousRange) SetMax(max float64) + func (r *ContinuousRange) SetMin(min float64) + func (r ContinuousRange) GetDelta() float64 + func (r ContinuousRange) GetDomain() int + func (r ContinuousRange) GetMax() float64 + func (r ContinuousRange) GetMin() float64 + func (r ContinuousRange) IsDescending() bool + func (r ContinuousRange) IsZero() bool + func (r ContinuousRange) String() string + func (r ContinuousRange) Translate(value float64) int + type ContinuousSeries struct + Name string + Style Style + XValueFormatter ValueFormatter + XValues []float64 + YAxis YAxisType + YValueFormatter ValueFormatter + YValues []float64 + func (cs ContinuousSeries) GetFirstValues() (float64, float64) + func (cs ContinuousSeries) GetLastValues() (float64, float64) + func (cs ContinuousSeries) GetName() string + func (cs ContinuousSeries) GetStyle() Style + func (cs ContinuousSeries) GetValueFormatters() (x, y ValueFormatter) + func (cs ContinuousSeries) GetValues(index int) (float64, float64) + func (cs ContinuousSeries) GetYAxis() YAxisType + func (cs ContinuousSeries) Len() int + func (cs ContinuousSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (cs ContinuousSeries) Validate() error + type DonutChart struct + Background Style + Canvas Style + ColorPalette ColorPalette + DPI float64 + Elements []Renderable + Font *truetype.Font + Height int + SliceStyle Style + Title string + TitleStyle Style + Values []Value + Width int + func (pc DonutChart) Box() Box + func (pc DonutChart) GetColorPalette() ColorPalette + func (pc DonutChart) GetDPI(defaults ...float64) float64 + func (pc DonutChart) GetFont() *truetype.Font + func (pc DonutChart) GetHeight() int + func (pc DonutChart) GetWidth() int + func (pc DonutChart) Render(rp RendererProvider, w io.Writer) error + type DotColorProvider func(xrange, yrange Range, index int, x, y float64) drawing.Color + type EMASeries struct + InnerSeries ValuesProvider + Name string + Period int + Style Style + YAxis YAxisType + func (ema *EMASeries) GetFirstValues() (x, y float64) + func (ema *EMASeries) GetLastValues() (x, y float64) + func (ema *EMASeries) GetValues(index int) (x, y float64) + func (ema *EMASeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (ema *EMASeries) Validate() error + func (ema EMASeries) GetName() string + func (ema EMASeries) GetPeriod() int + func (ema EMASeries) GetSigma() float64 + func (ema EMASeries) GetStyle() Style + func (ema EMASeries) GetYAxis() YAxisType + func (ema EMASeries) Len() int + type FirstValuesProvider interface + GetFirstValues func() (x, y float64) + type FullBoundedValuesProvider interface + type FullValuesProvider interface + type GridLine struct + IsMinor bool + Style Style + Value float64 + func GenerateGridLines(ticks []Tick, majorStyle, minorStyle Style) []GridLine + func (gl GridLine) Major() bool + func (gl GridLine) Minor() bool + func (gl GridLine) Render(r Renderer, canvasBox Box, ra Range, isVertical bool, defaults Style) + type GridLineProvider interface + GetGridLines func(ticks []Tick, isVertical bool, majorStyle, minorStyle Style) []GridLine + type HistogramSeries struct + InnerSeries ValuesProvider + Name string + Style Style + YAxis YAxisType + func (hs HistogramSeries) GetBoundedValues(index int) (x, y1, y2 float64) + func (hs HistogramSeries) GetName() string + func (hs HistogramSeries) GetStyle() Style + func (hs HistogramSeries) GetValues(index int) (x, y float64) + func (hs HistogramSeries) GetYAxis() YAxisType + func (hs HistogramSeries) Len() int + func (hs HistogramSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (hs HistogramSeries) Validate() error + type ImageWriter struct + func (ir *ImageWriter) Image() (image.Image, error) + func (ir *ImageWriter) SetRGBA(i *image.RGBA) + func (ir *ImageWriter) Write(buffer []byte) (int, error) + type IsZeroable interface + IsZero func() bool + type LastValuesProvider interface + GetLastValues func() (x, y float64) + type LinearCoefficientProvider interface + Coefficients func() (m, b, stdev, avg float64) + type LinearCoefficientSet struct + Avg float64 + B float64 + M float64 + StdDev float64 + func LinearCoefficients(m, b float64) LinearCoefficientSet + func NormalizedLinearCoefficients(m, b, stdev, avg float64) LinearCoefficientSet + func (lcs LinearCoefficientSet) Coefficients() (m, b, stdev, avg float64) + type LinearRegressionSeries struct + InnerSeries ValuesProvider + Limit int + Name string + Offset int + Style Style + YAxis YAxisType + func (lrs *LinearRegressionSeries) GetFirstValues() (x, y float64) + func (lrs *LinearRegressionSeries) GetLastValues() (x, y float64) + func (lrs *LinearRegressionSeries) GetValues(index int) (x, y float64) + func (lrs *LinearRegressionSeries) IsZero() bool + func (lrs *LinearRegressionSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (lrs *LinearRegressionSeries) Validate() error + func (lrs LinearRegressionSeries) Coefficients() (m, b, stdev, avg float64) + func (lrs LinearRegressionSeries) GetEndIndex() int + func (lrs LinearRegressionSeries) GetLimit() int + func (lrs LinearRegressionSeries) GetName() string + func (lrs LinearRegressionSeries) GetOffset() int + func (lrs LinearRegressionSeries) GetStyle() Style + func (lrs LinearRegressionSeries) GetYAxis() YAxisType + func (lrs LinearRegressionSeries) Len() int + type LinearSeq struct + func NewLinearSequence() *LinearSeq + func (lg *LinearSeq) WithEnd(end float64) *LinearSeq + func (lg *LinearSeq) WithStart(start float64) *LinearSeq + func (lg *LinearSeq) WithStep(step float64) *LinearSeq + func (lg LinearSeq) End() float64 + func (lg LinearSeq) GetValue(index int) float64 + func (lg LinearSeq) Len() int + func (lg LinearSeq) Start() float64 + func (lg LinearSeq) Step() float64 + type LinearSeries struct + InnerSeries LinearCoefficientProvider + Name string + Style Style + XValues []float64 + YAxis YAxisType + func (ls *LinearSeries) GetFirstValues() (x, y float64) + func (ls *LinearSeries) GetLastValues() (x, y float64) + func (ls *LinearSeries) GetValues(index int) (x, y float64) + func (ls *LinearSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (ls LinearSeries) GetEndIndex() int + func (ls LinearSeries) GetName() string + func (ls LinearSeries) GetStyle() Style + func (ls LinearSeries) GetYAxis() YAxisType + func (ls LinearSeries) IsZero() bool + func (ls LinearSeries) Len() int + func (ls LinearSeries) Validate() error + type LogarithmicRange struct + Descending bool + Domain int + Max float64 + Min float64 + func (r *LogarithmicRange) SetDomain(domain int) + func (r *LogarithmicRange) SetMax(max float64) + func (r *LogarithmicRange) SetMin(min float64) + func (r LogarithmicRange) GetDelta() float64 + func (r LogarithmicRange) GetDomain() int + func (r LogarithmicRange) GetMax() float64 + func (r LogarithmicRange) GetMin() float64 + func (r LogarithmicRange) GetTicks(render Renderer, defaults Style, vf ValueFormatter) []Tick + func (r LogarithmicRange) IsDescending() bool + func (r LogarithmicRange) IsZero() bool + func (r LogarithmicRange) String() string + func (r LogarithmicRange) Translate(value float64) int + type Logger interface + Debug func(...interface{}) + Debugf func(string, ...interface{}) + Err func(error) + Error func(...interface{}) + Errorf func(string, ...interface{}) + FatalErr func(error) + Info func(...interface{}) + Infof func(string, ...interface{}) + func NewLogger(options ...LoggerOption) Logger + type LoggerOption = func(*StdoutLogger) + func OptLoggerStderr(wr io.Writer) LoggerOption + func OptLoggerStdout(wr io.Writer) LoggerOption + type MACDLineSeries struct + InnerSeries ValuesProvider + Name string + PrimaryPeriod int + SecondaryPeriod int + Sigma float64 + Style Style + YAxis YAxisType + func (macdl *MACDLineSeries) GetValues(index int) (x float64, y float64) + func (macdl *MACDLineSeries) Len() int + func (macdl *MACDLineSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (macdl MACDLineSeries) GetName() string + func (macdl MACDLineSeries) GetPeriods() (w1, w2 int) + func (macdl MACDLineSeries) GetStyle() Style + func (macdl MACDLineSeries) GetYAxis() YAxisType + func (macdl MACDLineSeries) Validate() error + type MACDSeries struct + InnerSeries ValuesProvider + Name string + PrimaryPeriod int + SecondaryPeriod int + SignalPeriod int + Style Style + YAxis YAxisType + func (macd *MACDSeries) GetValues(index int) (x float64, y float64) + func (macd MACDSeries) GetName() string + func (macd MACDSeries) GetPeriods() (w1, w2, sig int) + func (macd MACDSeries) GetStyle() Style + func (macd MACDSeries) GetYAxis() YAxisType + func (macd MACDSeries) Len() int + func (macd MACDSeries) Validate() error + type MACDSignalSeries struct + InnerSeries ValuesProvider + Name string + PrimaryPeriod int + SecondaryPeriod int + SignalPeriod int + Style Style + YAxis YAxisType + func (macds *MACDSignalSeries) GetValues(index int) (x float64, y float64) + func (macds *MACDSignalSeries) Len() int + func (macds *MACDSignalSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (macds MACDSignalSeries) GetName() string + func (macds MACDSignalSeries) GetPeriods() (w1, w2, sig int) + func (macds MACDSignalSeries) GetStyle() Style + func (macds MACDSignalSeries) GetYAxis() YAxisType + func (macds MACDSignalSeries) Validate() error + type MaxSeries struct + InnerSeries ValuesProvider + Name string + Style Style + YAxis YAxisType + func (ms *MaxSeries) GetValues(index int) (x, y float64) + func (ms *MaxSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (ms *MaxSeries) Validate() error + func (ms MaxSeries) GetName() string + func (ms MaxSeries) GetStyle() Style + func (ms MaxSeries) GetYAxis() YAxisType + func (ms MaxSeries) Len() int + type MinSeries struct + InnerSeries ValuesProvider + Name string + Style Style + YAxis YAxisType + func (ms *MinSeries) GetValues(index int) (x, y float64) + func (ms *MinSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (ms *MinSeries) Validate() error + func (ms MinSeries) GetName() string + func (ms MinSeries) GetStyle() Style + func (ms MinSeries) GetYAxis() YAxisType + func (ms MinSeries) Len() int + type NameProvider interface + GetName func() string + type PercentChangeSeries struct + InnerSeries PercentChangeSeriesSource + Name string + Style Style + YAxis YAxisType + func (pcs PercentChangeSeries) GetFirstValues() (x, y float64) + func (pcs PercentChangeSeries) GetLastValues() (x, y float64) + func (pcs PercentChangeSeries) GetName() string + func (pcs PercentChangeSeries) GetStyle() Style + func (pcs PercentChangeSeries) GetValueFormatters() (x, y ValueFormatter) + func (pcs PercentChangeSeries) GetValues(index int) (x, y float64) + func (pcs PercentChangeSeries) GetYAxis() YAxisType + func (pcs PercentChangeSeries) Len() int + func (pcs PercentChangeSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (pcs PercentChangeSeries) Validate() error + type PercentChangeSeriesSource interface + type PieChart struct + Background Style + Canvas Style + ColorPalette ColorPalette + DPI float64 + Elements []Renderable + Font *truetype.Font + Height int + SliceStyle Style + Title string + TitleStyle Style + Values []Value + Width int + func (pc PieChart) Box() Box + func (pc PieChart) GetColorPalette() ColorPalette + func (pc PieChart) GetDPI(defaults ...float64) float64 + func (pc PieChart) GetFont() *truetype.Font + func (pc PieChart) GetHeight() int + func (pc PieChart) GetWidth() int + func (pc PieChart) Render(rp RendererProvider, w io.Writer) error + type Point struct + X int + Y int + func (p Point) DistanceTo(other Point) float64 + func (p Point) Equals(other Point) bool + func (p Point) String() string + type PolynomialRegressionSeries struct + Degree int + InnerSeries ValuesProvider + Limit int + Name string + Offset int + Style Style + YAxis YAxisType + func (prs *PolynomialRegressionSeries) GetFirstValues() (x, y float64) + func (prs *PolynomialRegressionSeries) GetLastValues() (x, y float64) + func (prs *PolynomialRegressionSeries) GetValues(index int) (x, y float64) + func (prs *PolynomialRegressionSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (prs *PolynomialRegressionSeries) Validate() error + func (prs PolynomialRegressionSeries) GetEndIndex() int + func (prs PolynomialRegressionSeries) GetLimit() int + func (prs PolynomialRegressionSeries) GetName() string + func (prs PolynomialRegressionSeries) GetOffset() int + func (prs PolynomialRegressionSeries) GetStyle() Style + func (prs PolynomialRegressionSeries) GetYAxis() YAxisType + func (prs PolynomialRegressionSeries) Len() int + type RGBACollector interface + SetRGBA func(i *image.RGBA) + type RandomSeq struct + func NewRandomSequence() *RandomSeq + func (r *RandomSeq) GetValue(_ int) float64 + func (r *RandomSeq) Len() int + func (r *RandomSeq) WithLen(length int) *RandomSeq + func (r *RandomSeq) WithMax(max float64) *RandomSeq + func (r *RandomSeq) WithMin(min float64) *RandomSeq + func (r RandomSeq) Max() *float64 + func (r RandomSeq) Min() *float64 + type Range interface + GetDelta func() float64 + GetDomain func() int + GetMax func() float64 + GetMin func() float64 + IsDescending func() bool + SetDomain func(domain int) + SetMax func(max float64) + SetMin func(min float64) + Translate func(value float64) int + type Renderable func(r Renderer, canvasBox Box, defaults Style) + func Legend(c *Chart, userDefaults ...Style) Renderable + func LegendLeft(c *Chart, userDefaults ...Style) Renderable + func LegendThin(c *Chart, userDefaults ...Style) Renderable + type Renderer interface + ArcTo func(cx, cy int, rx, ry, startAngle, delta float64) + Circle func(radius float64, x, y int) + ClearTextRotation func() + Close func() + Fill func() + FillStroke func() + GetDPI func() float64 + LineTo func(x, y int) + MeasureText func(body string) Box + MoveTo func(x, y int) + QuadCurveTo func(cx, cy, x, y int) + ResetStyle func() + Save func(w io.Writer) error + SetClassName func(string) + SetDPI func(dpi float64) + SetFillColor func(drawing.Color) + SetFont func(*truetype.Font) + SetFontColor func(drawing.Color) + SetFontSize func(size float64) + SetStrokeColor func(drawing.Color) + SetStrokeDashArray func(dashArray []float64) + SetStrokeWidth func(width float64) + SetTextRotation func(radians float64) + Stroke func() + Text func(body string, x, y int) + func PNG(width, height int) (Renderer, error) + func SVG(width, height int) (Renderer, error) + type RendererProvider func(int, int) (Renderer, error) + type SMASeries struct + InnerSeries ValuesProvider + Name string + Period int + Style Style + YAxis YAxisType + func (sma SMASeries) GetFirstValues() (x, y float64) + func (sma SMASeries) GetLastValues() (x, y float64) + func (sma SMASeries) GetName() string + func (sma SMASeries) GetPeriod(defaults ...int) int + func (sma SMASeries) GetStyle() Style + func (sma SMASeries) GetValues(index int) (x, y float64) + func (sma SMASeries) GetYAxis() YAxisType + func (sma SMASeries) Len() int + func (sma SMASeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (sma SMASeries) Validate() error + type Seq struct + func ValueSequence(values ...float64) Seq + func (s Seq) Average() float64 + func (s Seq) Each(mapfn func(int, float64)) + func (s Seq) FoldLeft(mapfn func(i int, v0, v float64) float64) (v0 float64) + func (s Seq) FoldRight(mapfn func(i int, v0, v float64) float64) (v0 float64) + func (s Seq) Map(mapfn func(i int, v float64) float64) Seq + func (s Seq) Max() float64 + func (s Seq) Median() (median float64) + func (s Seq) Min() float64 + func (s Seq) MinMax() (min, max float64) + func (s Seq) Normalize() Seq + func (s Seq) Percentile(percent float64) (percentile float64) + func (s Seq) Reverse() Seq + func (s Seq) Sort() Seq + func (s Seq) StdDev() float64 + func (s Seq) Sum() (accum float64) + func (s Seq) Values() (output []float64) + func (s Seq) Variance() float64 + type Sequence interface + GetValue func(int) float64 + Len func() int + type Series interface + GetName func() string + GetStyle func() Style + GetYAxis func() YAxisType + Render func(r Renderer, canvasBox Box, xrange, yrange Range, s Style) + Validate func() error + type SizeProvider func(xrange, yrange Range, index int, x, y float64) float64 + type StackedBar struct + Name string + Values []Value + Width int + func (sb StackedBar) GetWidth() int + type StackedBarChart struct + Background Style + BarSpacing int + Bars []StackedBar + Canvas Style + ColorPalette ColorPalette + DPI float64 + Elements []Renderable + Font *truetype.Font + Height int + IsHorizontal bool + Title string + TitleStyle Style + Width int + XAxis Style + YAxis Style + func (sbc StackedBarChart) Box() Box + func (sbc StackedBarChart) GetBarSpacing() int + func (sbc StackedBarChart) GetColorPalette() ColorPalette + func (sbc StackedBarChart) GetDPI(defaults ...float64) float64 + func (sbc StackedBarChart) GetFont() *truetype.Font + func (sbc StackedBarChart) GetHeight() int + func (sbc StackedBarChart) GetWidth() int + func (sbc StackedBarChart) Render(rp RendererProvider, w io.Writer) error + type StdoutLogger struct + Stderr io.Writer + Stdout io.Writer + TimeFormat string + func (l *StdoutLogger) Debug(arguments ...interface{}) + func (l *StdoutLogger) Debugf(format string, arguments ...interface{}) + func (l *StdoutLogger) Err(err error) + func (l *StdoutLogger) Error(arguments ...interface{}) + func (l *StdoutLogger) Errorf(format string, arguments ...interface{}) + func (l *StdoutLogger) Errorln(arguments ...interface{}) + func (l *StdoutLogger) FatalErr(err error) + func (l *StdoutLogger) Info(arguments ...interface{}) + func (l *StdoutLogger) Infof(format string, arguments ...interface{}) + func (l *StdoutLogger) Println(arguments ...interface{}) + type Stringable interface + String func() string + type Style struct + ClassName string + DotColor drawing.Color + DotColorProvider DotColorProvider + DotWidth float64 + DotWidthProvider SizeProvider + FillColor drawing.Color + Font *truetype.Font + FontColor drawing.Color + FontSize float64 + Hidden bool + Padding Box + StrokeColor drawing.Color + StrokeDashArray []float64 + StrokeWidth float64 + TextHorizontalAlign TextHorizontalAlign + TextLineSpacing int + TextRotationDegrees float64 + TextVerticalAlign TextVerticalAlign + TextWrap TextWrap + func Hidden() Style + func Shown() Style + func StyleTextDefaults() Style + func (s Style) GetClassName(defaults ...string) string + func (s Style) GetDotColor(defaults ...drawing.Color) drawing.Color + func (s Style) GetDotOptions() Style + func (s Style) GetDotWidth(defaults ...float64) float64 + func (s Style) GetFillAndStrokeOptions() Style + func (s Style) GetFillColor(defaults ...drawing.Color) drawing.Color + func (s Style) GetFillOptions() Style + func (s Style) GetFont(defaults ...*truetype.Font) *truetype.Font + func (s Style) GetFontColor(defaults ...drawing.Color) drawing.Color + func (s Style) GetFontSize(defaults ...float64) float64 + func (s Style) GetPadding(defaults ...Box) Box + func (s Style) GetStrokeColor(defaults ...drawing.Color) drawing.Color + func (s Style) GetStrokeDashArray(defaults ...[]float64) []float64 + func (s Style) GetStrokeOptions() Style + func (s Style) GetStrokeWidth(defaults ...float64) float64 + func (s Style) GetTextHorizontalAlign(defaults ...TextHorizontalAlign) TextHorizontalAlign + func (s Style) GetTextLineSpacing(defaults ...int) int + func (s Style) GetTextOptions() Style + func (s Style) GetTextRotationDegrees(defaults ...float64) float64 + func (s Style) GetTextVerticalAlign(defaults ...TextVerticalAlign) TextVerticalAlign + func (s Style) GetTextWrap(defaults ...TextWrap) TextWrap + func (s Style) InheritFrom(defaults Style) (final Style) + func (s Style) IsZero() bool + func (s Style) ShouldDrawDot() bool + func (s Style) ShouldDrawFill() bool + func (s Style) ShouldDrawStroke() bool + func (s Style) String() string + func (s Style) WriteDrawingOptionsToRenderer(r Renderer) + func (s Style) WriteTextOptionsToRenderer(r Renderer) + func (s Style) WriteToRenderer(r Renderer) + type StyleProvider interface + GetStyle func() Style + type TextHorizontalAlign int + const TextHorizontalAlignCenter + const TextHorizontalAlignLeft + const TextHorizontalAlignRight + const TextHorizontalAlignUnset + type TextStyle struct + HorizontalAlign TextHorizontalAlign + VerticalAlign TextVerticalAlign + Wrap TextWrap + type TextVerticalAlign int + const TextVerticalAlignBaseline + const TextVerticalAlignBottom + const TextVerticalAlignMiddle + const TextVerticalAlignMiddleBaseline + const TextVerticalAlignTop + const TextVerticalAlignUnset + type TextWrap int + const TextWrapNone + const TextWrapRune + const TextWrapUnset + const TextWrapWord + type Tick struct + Label string + Value float64 + func GenerateContinuousTicks(r Renderer, ra Range, isVertical bool, style Style, vf ValueFormatter) []Tick + type TickPosition int + const TickPositionBetweenTicks + const TickPositionUnderTick + const TickPositionUnset + type Ticks []Tick + func (t Ticks) Len() int + func (t Ticks) Less(i, j int) bool + func (t Ticks) String() string + func (t Ticks) Swap(i, j int) + type TicksProvider interface + GetTicks func(r Renderer, defaults Style, vf ValueFormatter) []Tick + type TimeAscending []time.Time + func (a TimeAscending) Len() int + func (a TimeAscending) Less(i, j int) bool + func (a TimeAscending) Swap(i, j int) + type TimeDescending []time.Time + func (d TimeDescending) Len() int + func (d TimeDescending) Less(i, j int) bool + func (d TimeDescending) Swap(i, j int) + type TimeSeries struct + Name string + Style Style + XValues []time.Time + YAxis YAxisType + YValues []float64 + func (ts TimeSeries) GetFirstValues() (x, y float64) + func (ts TimeSeries) GetLastValues() (x, y float64) + func (ts TimeSeries) GetName() string + func (ts TimeSeries) GetStyle() Style + func (ts TimeSeries) GetValueFormatters() (x, y ValueFormatter) + func (ts TimeSeries) GetValues(index int) (x, y float64) + func (ts TimeSeries) GetYAxis() YAxisType + func (ts TimeSeries) Len() int + func (ts TimeSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + func (ts TimeSeries) Validate() error + type Times []time.Time + func (t Times) Array() []time.Time + func (t Times) GetValue(index int) float64 + func (t Times) Len() int + func (t Times) Less(i, j int) bool + func (t Times) Swap(i, j int) + type Value struct + Label string + Style Style + Value float64 + type Value2 struct + Label string + Style Style + XValue float64 + YValue float64 + type ValueBuffer struct + func NewValueBuffer(values ...float64) *ValueBuffer + func NewValueBufferWithCapacity(capacity int) *ValueBuffer + func (b *ValueBuffer) Array() Array + func (b *ValueBuffer) Capacity() int + func (b *ValueBuffer) Clear() + func (b *ValueBuffer) Dequeue() float64 + func (b *ValueBuffer) Each(mapfn func(int, float64)) + func (b *ValueBuffer) Enqueue(value float64) + func (b *ValueBuffer) GetValue(index int) float64 + func (b *ValueBuffer) Len() int + func (b *ValueBuffer) Peek() float64 + func (b *ValueBuffer) PeekBack() float64 + func (b *ValueBuffer) SetCapacity(capacity int) + func (b *ValueBuffer) String() string + func (b *ValueBuffer) TrimExcess() + type ValueFormatter func(v interface{}) string + func KValueFormatter(k float64, vf ValueFormatter) ValueFormatter + func TimeValueFormatterWithFormat(format string) ValueFormatter + type ValueFormatterProvider interface + GetValueFormatters func() (x, y ValueFormatter) + type Values []Value + func (vs Values) Normalize() []Value + func (vs Values) Values() []float64 + func (vs Values) ValuesNormalized() []float64 + type ValuesProvider interface + GetValues func(index int) (float64, float64) + Len func() int + type XAxis struct + GridLines []GridLine + GridMajorStyle Style + GridMinorStyle Style + Name string + NameStyle Style + Range Range + Style Style + TickPosition TickPosition + TickStyle Style + Ticks []Tick + ValueFormatter ValueFormatter + func HideXAxis() XAxis + func (xa XAxis) GetGridLines(ticks []Tick) []GridLine + func (xa XAxis) GetName() string + func (xa XAxis) GetStyle() Style + func (xa XAxis) GetTickPosition(defaults ...TickPosition) TickPosition + func (xa XAxis) GetTicks(r Renderer, ra Range, defaults Style, vf ValueFormatter) []Tick + func (xa XAxis) GetValueFormatter() ValueFormatter + func (xa XAxis) Measure(r Renderer, canvasBox Box, ra Range, defaults Style, ticks []Tick) Box + func (xa XAxis) Render(r Renderer, canvasBox Box, ra Range, defaults Style, ticks []Tick) + type YAxis struct + Ascending bool + AxisType YAxisType + GridLines []GridLine + GridMajorStyle Style + GridMinorStyle Style + Name string + NameStyle Style + Range Range + Style Style + TickStyle Style + Ticks []Tick + ValueFormatter ValueFormatter + Zero GridLine + func HideYAxis() YAxis + func (ya YAxis) GetGridLines(ticks []Tick) []GridLine + func (ya YAxis) GetName() string + func (ya YAxis) GetNameStyle() Style + func (ya YAxis) GetStyle() Style + func (ya YAxis) GetTickStyle() Style + func (ya YAxis) GetTicks(r Renderer, ra Range, defaults Style, vf ValueFormatter) []Tick + func (ya YAxis) GetValueFormatter() ValueFormatter + func (ya YAxis) Measure(r Renderer, canvasBox Box, ra Range, defaults Style, ticks []Tick) Box + func (ya YAxis) Render(r Renderer, canvasBox Box, ra Range, defaults Style, ticks []Tick) + type YAxisType int + const YAxisPrimary + const YAxisSecondary Other modules containing this package github.com/dolfly/go-chart