Versions in this module Expand all Collapse all v1 v1.1.0 Jul 19, 2016 Changes in this version + const DefaultAnnotationDeltaWidth + const DefaultAnnotationFontSize + const DefaultAxisFontSize + const DefaultAxisLineWidth + const DefaultChartHeight + const DefaultChartWidth + const DefaultDPI + const DefaultDateFormat + const DefaultDateHourFormat + const DefaultDateMinuteFormat + const DefaultEMAPeriod + const DefaultFloatFormat + const DefaultFontSize + const DefaultHorizontalTickWidth + const DefaultMACDPeriodPrimary + const DefaultMACDPeriodSecondary + const DefaultMACDSignalPeriod + const DefaultMinimumFontSize + const DefaultMinimumTickHorizontalSpacing + const DefaultMinimumTickVerticalSpacing + const DefaultPercentValueFormat + const DefaultSimpleMovingAveragePeriod + const DefaultStrokeWidth + const DefaultTickCount + const DefaultTickCountSanityCheck + const DefaultTitleFontSize + const DefaultTitleTop + const DefaultVerticalTickHeight + const DefaultXAxisMargin + const DefaultYAxisMargin + var DashArrayDashesLarge = []int + var DashArrayDashesMedium = []int + var DashArrayDashesSmall = []int + var DashArrayDots = []int + var DefaultAnnotationFillColor = drawing.Color + var DefaultAnnotationPadding = Box + var DefaultAxisColor = drawing.Color + var DefaultBackgroundColor = drawing.Color + var DefaultBackgroundPadding = Box + var DefaultBackgroundStrokeColor = drawing.Color + var DefaultCanvasColor = drawing.Color + var DefaultCanvasStrokeColor = drawing.Color + var DefaultFillColor = drawing.Color + var DefaultGridLineColor = drawing.Color + var DefaultSeriesStrokeColors = []drawing.Color + var DefaultStrokeColor = drawing.Color + var DefaultTextColor = drawing.Color + func AbsInt(value int) int + func DrawAnnotation(r Renderer, canvasBox Box, style Style, lx, ly int, label string) + func DrawBoundedSeries(r Renderer, canvasBox Box, xrange, yrange Range, s Style, ...) + func DrawBox(r Renderer, b Box, s Style) + func DrawHistogramSeries(r Renderer, canvasBox Box, xrange, yrange Range, s Style, vs ValueProvider, ...) + func DrawLineSeries(r Renderer, canvasBox Box, xrange, yrange Range, s Style, vs ValueProvider) + func DrawText(r Renderer, text string, x, y int, s Style) + func DrawTextCentered(r Renderer, text string, x, y int, s Style) + func FloatValueFormatter(v interface{}) string + func FloatValueFormatterWithFormat(v interface{}, floatFormat string) string + func GetDefaultFont() (*truetype.Font, error) + func GetDefaultSeriesStrokeColor(index int) drawing.Color + func GetRoundToForDelta(delta float64) float64 + func MaxInt(values ...int) int + func MinAndMax(values ...float64) (min float64, max float64) + func MinAndMaxOfTime(values ...time.Time) (min time.Time, max time.Time) + func MinInt(values ...int) int + func PercentDifference(v1, v2 float64) float64 + func PercentValueFormatter(v interface{}) string + func RoundDown(value, roundTo float64) float64 + func RoundUp(value, roundTo float64) float64 + func Seq(start, end float64, steps ...float64) []float64 + func SeqDays(days int) []time.Time + func SeqRand(samples int, scale float64) []float64 + func Slices(count int, total float64) []float64 + func TimeHourValueFormatter(v interface{}) string + func TimeMinuteValueFormatter(v interface{}) string + func TimeToFloat64(t time.Time) float64 + func TimeValueFormatter(v interface{}) string + func TimeValueFormatterWithFormat(v interface{}, dateFormat string) string + type Annotation struct + Label string + X float64 + Y float64 + type AnnotationSeries struct + Annotations []Annotation + Name string + Style Style + YAxis YAxisType + 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) + type Axis interface + GetGridLines func(ticks []Tick) []GridLine + GetName func() string + GetStyle func() Style + GetTicks func(r Renderer, ra Range, vf ValueFormatter) []Tick + Render func(c *Chart, r Renderer, canvasBox Box, ra Range, ticks []Tick) + type BollingerBandsSeries struct + InnerSeries ValueProvider + K float64 + Name string + Period int + Style Style + YAxis YAxisType + func (bbs *BollingerBandsSeries) GetBoundedLastValue() (x, y1, y2 float64) + func (bbs *BollingerBandsSeries) GetBoundedValue(index int) (x, y1, y2 float64) + func (bbs *BollingerBandsSeries) Len() int + 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 + type BoundedLastValueProvider interface + GetBoundedLastValue func() (x, y1, y2 float64) + type BoundedValueProvider interface + GetBoundedValue func(index int) (x, y1, y2 float64) + Len func() int + type Box struct + Bottom int + Left int + Right int + Top int + func MeasureAnnotation(r Renderer, canvasBox Box, s Style, lx, ly int, label string) 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) 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) Width() int + type Chart struct + Background Style + Canvas Style + DPI float64 + Elements []Renderable + Font *truetype.Font + Height int + Series []Series + Title string + TitleStyle Style + Width int + XAxis XAxis + YAxis YAxis + YAxisSecondary YAxis + func (c Chart) Box() Box + 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 ContinuousSeries struct + Name string + Style Style + XValues []float64 + YAxis YAxisType + YValues []float64 + func (cs ContinuousSeries) GetLastValue() (float64, float64) + func (cs ContinuousSeries) GetName() string + func (cs ContinuousSeries) GetStyle() Style + func (cs ContinuousSeries) GetValue(index int) (float64, float64) + func (cs ContinuousSeries) GetValueFormatters() (x, y ValueFormatter) + func (cs ContinuousSeries) GetYAxis() YAxisType + func (cs ContinuousSeries) Len() int + func (cs ContinuousSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + type EMASeries struct + InnerSeries ValueProvider + Name string + Period int + Style Style + YAxis YAxisType + func (ema *EMASeries) GetLastValue() (x, y float64) + func (ema *EMASeries) GetValue(index int) (x, y float64) + func (ema *EMASeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + 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 Float float64 + func (f Float) String() string + type FullBoundedValueProvider interface + type FullValueProvider interface + type GridLine struct + IsMinor bool + IsVertical bool + Style Style + Value float64 + func GenerateGridLines(ticks []Tick, isVertical bool) []GridLine + func (gl GridLine) Horizontal() bool + func (gl GridLine) Major() bool + func (gl GridLine) Minor() bool + func (gl GridLine) Render(r Renderer, canvasBox Box, ra Range) + func (gl GridLine) Vertical() bool + type HistogramSeries struct + InnerSeries ValueProvider + Name string + Style Style + YAxis YAxisType + func (hs HistogramSeries) GetBoundedValue(index int) (x, y1, y2 float64) + func (hs HistogramSeries) GetName() string + func (hs HistogramSeries) GetStyle() Style + func (hs HistogramSeries) GetValue(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) + type LastValueProvider interface + GetLastValue func() (x, y float64) + type MACDLineSeries struct + InnerSeries ValueProvider + Name string + PrimaryPeriod int + SecondaryPeriod int + Sigma float64 + Style Style + YAxis YAxisType + func (macdl *MACDLineSeries) GetValue(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 + type MACDSeries struct + InnerSeries ValueProvider + Name string + PrimaryPeriod int + SecondaryPeriod int + SignalPeriod int + Style Style + YAxis YAxisType + func (macd *MACDSeries) GetValue(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 + type MACDSignalSeries struct + InnerSeries ValueProvider + Name string + PrimaryPeriod int + SecondaryPeriod int + SignalPeriod int + Style Style + YAxis YAxisType + func (macds *MACDSignalSeries) GetValue(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 + type Range struct + Domain int + Max float64 + Min float64 + func (r Range) Delta() float64 + func (r Range) GetRoundedRangeBounds() (min, max float64) + func (r Range) IsZero() bool + func (r Range) String() string + func (r Range) Translate(value float64) int + type Renderable func(r Renderer, canvasBox Box, defaults Style) + func CreateLegend(c *Chart, userDefaults ...Style) Renderable + type Renderer interface + Circle func(radius float64, x, y int) + Close func() + Fill func() + FillStroke func() + GetDPI func() float64 + LineTo func(x, y int) + MeasureText func(body string) Box + MoveTo func(x, y int) + Save func(w io.Writer) error + 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) + 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 RingBuffer struct + func NewRingBuffer() *RingBuffer + func NewRingBufferFromSlice(values []interface{}) *RingBuffer + func NewRingBufferWithCapacity(capacity int) *RingBuffer + func (rb *RingBuffer) AsSlice() []interface{} + func (rb *RingBuffer) Clear() + func (rb *RingBuffer) Dequeue() interface{} + func (rb *RingBuffer) Each(consumer func(value interface{})) + func (rb *RingBuffer) Enqueue(object interface{}) + func (rb *RingBuffer) Len() int + func (rb *RingBuffer) Peek() interface{} + func (rb *RingBuffer) PeekBack() interface{} + func (rb *RingBuffer) String() string + func (rb *RingBuffer) TotalLen() int + func (rb *RingBuffer) TrimExcess() + type SMASeries struct + InnerSeries ValueProvider + Name string + Period int + Style Style + YAxis YAxisType + func (sma SMASeries) GetLastValue() (x, y float64) + func (sma SMASeries) GetName() string + func (sma SMASeries) GetPeriod(defaults ...int) int + func (sma SMASeries) GetStyle() Style + func (sma SMASeries) GetValue(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) + type Series interface + GetName func() string + GetStyle func() Style + GetYAxis func() YAxisType + Render func(r Renderer, canvasBox Box, xrange, yrange Range, s Style) + type Style struct + FillColor drawing.Color + Font *truetype.Font + FontColor drawing.Color + FontSize float64 + Padding Box + Show bool + StrokeColor drawing.Color + StrokeDashArray []float64 + StrokeWidth float64 + func (s Style) GetFillColor(defaults ...drawing.Color) drawing.Color + 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) GetStrokeWidth(defaults ...float64) float64 + func (s Style) IsZero() bool + func (s Style) SVG(dpi float64) string + func (s Style) SVGFill() Style + func (s Style) SVGFillAndStroke() Style + func (s Style) SVGFontFace() string + func (s Style) SVGStroke() Style + func (s Style) SVGStrokeDashArray() string + func (s Style) SVGText() Style + func (s Style) String() string + func (s Style) WithDefaultsFrom(defaults Style) (final Style) + type Tick struct + Label string + Value float64 + func GenerateTicksWithStep(ra Range, step float64, vf ValueFormatter) []Tick + type Ticks []Tick + func (t Ticks) Len() int + func (t Ticks) Less(i, j int) bool + func (t Ticks) Swap(i, j int) + type TimeSeries struct + Name string + Style Style + XValues []time.Time + YAxis YAxisType + YValues []float64 + func (ts TimeSeries) GetLastValue() (x, y float64) + func (ts TimeSeries) GetName() string + func (ts TimeSeries) GetStyle() Style + func (ts TimeSeries) GetValue(index int) (x, y float64) + func (ts TimeSeries) GetValueFormatters() (x, y ValueFormatter) + func (ts TimeSeries) GetYAxis() YAxisType + func (ts TimeSeries) Len() int + func (ts TimeSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) + type ValueFormatter func(v interface{}) string + type ValueFormatterProvider interface + GetValueFormatters func() (x, y ValueFormatter) + type ValueProvider interface + GetValue func(index int) (float64, float64) + Len func() int + type XAxis struct + GridLines []GridLine + GridMajorStyle Style + GridMinorStyle Style + Name string + Range Range + Style Style + Ticks []Tick + ValueFormatter ValueFormatter + func (xa XAxis) GetGridLines(ticks []Tick) []GridLine + func (xa XAxis) GetName() string + func (xa XAxis) GetStyle() Style + func (xa XAxis) GetTicks(r Renderer, ra Range, defaults Style, vf ValueFormatter) []Tick + 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 + AxisType YAxisType + GridLines []GridLine + GridMajorStyle Style + GridMinorStyle Style + Name string + Range Range + Style Style + Ticks []Tick + ValueFormatter ValueFormatter + Zero GridLine + func (ya YAxis) GetGridLines(ticks []Tick) []GridLine + func (ya YAxis) GetName() string + func (ya YAxis) GetStyle() Style + func (ya YAxis) GetTicks(r Renderer, ra Range, defaults Style, vf ValueFormatter) []Tick + 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 v1.0.0-rc.2 Jul 14, 2016 v1.0.0-rc.1 Jul 13, 2016 Incompatible versions in this module v2.0.0-rc.2+incompatible Aug 12, 2016 v2.0.0-rc.1+incompatible Aug 7, 2016