Registry / utility / wcharczuk-go-chart

wcharczuk-go-chart

JSON →
library2.0.1+incompatiblegogounverified

Go Chart is a Go library for generating charts and graphs as images.

go get github.com/wcharczuk/go-chart
INSTALL
IMPORT
SIG · WCHARCZUK-GO-CHART
W
wcharczuk-go-chart
utilitygov2.0.1+incompatible
harness data pending
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

Create a simple line chart and render to PNG

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
breakingVersion 2.x uses a different import path (v2 subdirectory) than v1.
fix
Use import path github.com/wcharczuk/go-chart/v2 for version 2.x.
affects: >=2.0.0
Upgrade
Version history
2.0.1+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
wcharczuk-go-chart — go get wcharczuk-go-chart · libregistry