Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
chart
✓ github.com/wcharczuk/go-chart/v2
Creates a simple line chart and renders it to a PNG file.
package main
import (
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {
graph := chart.Chart{
Series: []chart.Series{
chart.ContinuousSeries{
XValues: []float64{1.0, 2.0, 3.0},
YValues: []float64{1.0, 2.0, 3.0},
},
},
}
f, _ := os.Create("output.png")
defer f.Close()
graph.Render(chart.PNG, f)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
2.1.2latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.