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.
charts
✓ github.com/go-echarts/go-echarts/v2/charts
Creates a simple bar chart and renders it to an HTML file.
package main
import (
"github.com/go-echarts/go-echarts/v2/charts"
"github.com/go-echarts/go-echarts/v2/opts"
"os"
)
func main() {
bar := charts.NewBar()
bar.SetGlobalOptions(charts.WithTitleOpts(opts.Title{Title: "My Bar Chart"}))
bar.AddSeries("Category", []opts.BarData{{Value: 10}, {Value: 20}})
f, _ := os.Create("bar.html")
bar.Render(f)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.