Message ID
DKIM signature
Download raw message
The giocanvas package now includes a charting package,
giocanvas/chart.  It supports line, area, scatter, and bar charts,
with titles and configurable axes.

The package reads data into a ChartBox structure (name, value pairs
(tab-separated) with metadata).

type ChartBox struct {
    Title                    string
    Data                     []NameValue
    Color                    color.RGBA
    Top, Bottom, Left, Right float64
    Minvalue, Maxvalue       float64
    Zerobased                bool

import (

canvas := giocanvas.NewCanvas(...)
mychart, err := chart.DataRead(os.Stdin)
mychart.Top = 90
mychart.Left = 20
mychart.Bar(canvas, 0.2)
mychart.Scatter(canvas, 0.5)
mychart.Label(canvas, 1.5, 2)
mychart.YAxis(canvas, 1.5, 0,100,20,"%.1f",true)
Export thread (mbox)