{"id":13416848,"url":"https://github.com/go-echarts/go-echarts","last_synced_at":"2025-05-12T15:18:38.290Z","repository":{"id":37359113,"uuid":"165092572","full_name":"go-echarts/go-echarts","owner":"go-echarts","description":"🎨 The adorable charts library for Golang.","archived":false,"fork":false,"pushed_at":"2025-05-08T16:28:06.000Z","size":4475,"stargazers_count":7164,"open_issues_count":59,"forks_count":574,"subscribers_count":98,"default_branch":"master","last_synced_at":"2025-05-12T15:18:31.435Z","etag":null,"topics":["charts","echarts","golang-visualization"],"latest_commit_sha":null,"homepage":"https://go-echarts.github.io/go-echarts/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-echarts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-01-10T16:22:41.000Z","updated_at":"2025-05-11T18:57:45.000Z","dependencies_parsed_at":"2023-10-16T19:09:20.481Z","dependency_job_id":"7956e765-cd67-4604-bfd9-233b055ced46","html_url":"https://github.com/go-echarts/go-echarts","commit_stats":{"total_commits":274,"total_committers":38,"mean_commits":"7.2105263157894735","dds":"0.34306569343065696","last_synced_commit":"beec2e84387973ffe3d5eb2b7e81db9e2aeb9a70"},"previous_names":["chenjiandongx/go-echarts"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-echarts%2Fgo-echarts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-echarts%2Fgo-echarts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-echarts%2Fgo-echarts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-echarts%2Fgo-echarts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-echarts","download_url":"https://codeload.github.com/go-echarts/go-echarts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253763962,"owners_count":21960484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["charts","echarts","golang-visualization"],"created_at":"2024-07-30T22:00:23.557Z","updated_at":"2025-05-12T15:18:37.828Z","avatar_url":"https://github.com/go-echarts.png","language":"Go","funding_links":[],"categories":["Popular","Go","Misc","Programming","Containers \u0026 Language Extentions \u0026 Linting","语言资源库","Golang"],"sub_categories":["Golang","For Go","go","Charts/Plot"],"readme":"\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52535979-c0d0e680-2d8f-11e9-85c8-2e9f659e7c6f.png\" width=300 height=300 /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003ego-echarts\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003e🎨 The adorable charts library for Golang.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/go-echarts/go-echarts/actions/workflows/ci.yml\" style=\"text-decoration: none;\"\u003e\n        \u003cimg src=\"https://github.com/go-echarts/go-echarts/actions/workflows/ci.yml/badge.svg\" alt=\"Build Status\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/go-echarts/go-echarts\" style=\"text-decoration: none;\"\u003e\n        \u003cimg src=\"https://goreportcard.com/badge/github.com/go-echarts/go-echarts\" alt=\"Go Report Card\"\u003e\n    \u003c/a\u003e\n\t\u003ca href=\"https://github.com/go-echarts/go-echarts/pulls\" style=\"text-decoration: none;\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat\" alt=\"Contributions welcome\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://opensource.org/licenses/MIT\" style=\"text-decoration: none;\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-MIT-brightgreen.svg\" alt=\"MIT License\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/go-echarts/go-echarts/v2\" style=\"text-decoration: none;\"\u003e\n        \u003cimg src=\"https://godoc.org/github.com/go-echarts/go-echarts?status.svg\" alt=\"GoDoc\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://echarts.apache.org/\" style=\"text-decoration: none;\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/echarts-_v5.4.3-orange\" alt=\"echartsVersion\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://go-echarts.github.io/go-echarts\" style=\"text-decoration: none;\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/docs-_handbook-blue\" alt=\"handbook\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e If a language can be used to build web scrapers, it definitely needs to provide a graceful data visualization\n\u003e library. --- by dongdong.\n\nIn the Golang ecosystem, there are not many choices for data visualization libraries.  \nThe development of [go-echarts](https://github.com/go-echarts/go-echarts) aims to\nprovide a simple yet powerful data visualization library for Golang.   \n[Apache ECharts](https://echarts.apache.org/) is an awesome charting and visualization library,\nit supports adorable chart types and various interactive features.\nand there have many program languages interactive with Echarts, such as [pyecharts](https://github.com/pyecharts/pyecharts),\nwhich `go-echarts` learns and has evolved a lot from, and the [echarts4j](https://github.com/Koooooo-7/echarts4j) either.\n\n[中文 README](README_CN.md)\n\n### 🔰 Installation\n\nClassic way to get go-echarts\n\n```shell\n# this may be not a good choice to use v2 go-echarts without gomod(GO111MODULE=off), the \n# next generation version management system \n# Technically, you could use go-echarts in the way below, if you have a better workaround, please let us know....\n\n$ go get -u github.com/go-echarts/go-echarts/...\n$ cd $go-echarts-project\n$ mkdir v2 \u0026\u0026 mv charts components datasets opts render templates types v2\n```\n\nUse gomod style\n\n```shell\n$ go get -u github.com/go-echarts/go-echarts/v2/...\n```\n\nOR\n\n```shell\n# go.mod\n\nrequire github.com/go-echarts/go-echarts/v2\n```\n\n### ⏳ Version\n\nThe go-echarts project is being developed under v2 version and the active codebase is on the master branch.\n\nv1 and v2 are incompatible which means that you cannot upgrade go-echarts from v1 to v2 smoothly. But I think it is\nworth trying that new version.\n\nEspecially, when there contains mino changes (usually in enhancement), we will release the `rc` version before a\nstandard release.\nSo, if you upgrade your projects cross the `rc` versions, maybe need little adjust, and I believe it is worthy to do.\n\n### ✨ Features\n\n* Clean and comprehensive API.\n* Visualize your data in 25+ different ways.\n* Highly configurable chart options.\n* Detailed documentation and a rich collection of examples.\n* Visualize your geographical data with 400+ maps.\n\n### 📝 Usage\n\nIt's easy to get started with go-echarts with the [handbook](https://go-echarts.github.io/go-echarts), [go-echarts/examples](https://github.com/go-echarts/examples)\nand [GoDocs](https://pkg.go.dev/github.com/go-echarts/go-echarts/v2).\n\nIn this example, we create a simple bar chart with only a few lines of code.\n\n```golang\npackage main\n\nimport (\n\t\"math/rand\"\n\t\"os\"\n\n\t\"github.com/go-echarts/go-echarts/v2/charts\"\n\t\"github.com/go-echarts/go-echarts/v2/opts\"\n)\n\n// generate random data for bar chart\nfunc generateBarItems() []opts.BarData {\n\titems := make([]opts.BarData, 0)\n\tfor i := 0; i \u003c 7; i++ {\n\t\titems = append(items, opts.BarData{Value: rand.Intn(300)})\n\t}\n\treturn items\n}\n\nfunc main() {\n\t// create a new bar instance\n\tbar := charts.NewBar()\n\t// set some global options like Title/Legend/ToolTip or anything else\n\tbar.SetGlobalOptions(charts.WithTitleOpts(opts.Title{\n\t\tTitle:    \"My first bar chart generated by go-echarts\",\n\t\tSubtitle: \"It's extremely easy to use, right?\",\n\t}))\n\n\t// Put data into instance\n\tbar.SetXAxis([]string{\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"}).\n\t\tAddSeries(\"Category A\", generateBarItems()).\n\t\tAddSeries(\"Category B\", generateBarItems())\n\t// Where the magic happens\n\tf, _ := os.Create(\"bar.html\")\n\tbar.Render(f)\n}\n```\n\nAnd the generated bar.html is rendered as below. Isn't that cool！\n\n![](https://user-images.githubusercontent.com/19553554/98435974-5094f780-2112-11eb-81f6-b31d68f4d535.png)\n\nOf course we can also start a listening web server with net/http.\n\n```golang\npackage main\n\nimport (\n\t\"math/rand\"\n\t\"net/http\"\n\n\t\"github.com/go-echarts/go-echarts/v2/charts\"\n\t\"github.com/go-echarts/go-echarts/v2/opts\"\n\t\"github.com/go-echarts/go-echarts/v2/types\"\n)\n\n// generate random data for line chart\nfunc generateLineItems() []opts.LineData {\n\titems := make([]opts.LineData, 0)\n\tfor i := 0; i \u003c 7; i++ {\n\t\titems = append(items, opts.LineData{Value: rand.Intn(300)})\n\t}\n\treturn items\n}\n\nfunc httpserver(w http.ResponseWriter, _ *http.Request) {\n\t// create a new line instance\n\tline := charts.NewLine()\n\t// set some global options like Title/Legend/ToolTip or anything else\n\tline.SetGlobalOptions(\n\t\tcharts.WithInitializationOpts(opts.Initialization{Theme: types.ThemeWesteros}),\n\t\tcharts.WithTitleOpts(opts.Title{\n\t\t\tTitle:    \"Line example in Westeros theme\",\n\t\t\tSubtitle: \"Line chart rendered by the http server this time\",\n\t\t}))\n\n\t// Put data into instance\n\tline.SetXAxis([]string{\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"}).\n\t\tAddSeries(\"Category A\", generateLineItems()).\n\t\tAddSeries(\"Category B\", generateLineItems()).\n\t\tSetSeriesOptions(charts.WithLineChartOpts(opts.LineChart{Smooth: opts.Bool(true)}))\n\tline.Render(w)\n}\n\nfunc main() {\n\thttp.HandleFunc(\"/\", httpserver)\n\thttp.ListenAndServe(\":8081\", nil)\n}\n```\n\n![image](https://user-images.githubusercontent.com/19553554/98436642-044cb600-2118-11eb-9f35-784948a92cb5.png)\n\n### 🔖 Gallery\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52197440-843a5200-289a-11e9-8601-3ce8d945b04a.gif\" width=\"33%\" alt=\"bar\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52360729-ad640980-2a77-11e9-84e2-feff7e11aea5.gif\" width=\"33%\" alt=\"boxplot\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52535290-4b611800-2d87-11e9-8bf2-b43a54a3bda8.png\" width=\"33%\" alt=\"effectScatter\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52332816-ac5eb800-2a36-11e9-8227-3538976f447d.gif\" width=\"33%\" alt=\"funnel\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52332988-0b243180-2a37-11e9-9db8-eb6b8c86a0de.png\" width=\"33%\" alt=\"gague\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52344575-133f9980-2a56-11e9-93e0-568e484936ce.gif\" width=\"33%\" alt=\"geo\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52727805-f7f20280-2ff0-11e9-91ab-cd99848e3127.gif\" width=\"33%\" alt=\"graph\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52345115-6534ef00-2a57-11e9-80cd-9cbfed252139.gif\" width=\"33%\" alt=\"heatmap\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52345490-4a16af00-2a58-11e9-9b43-7bbc86aa05b6.gif\" width=\"33%\" alt=\"kline\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52346064-b7770f80-2a59-11e9-9e03-6dae3a8c637d.gif\" width=\"33%\" alt=\"line\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52347117-248ba480-2a5c-11e9-8402-5a94054dca50.gif\" width=\"33%\" alt=\"liquid\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52347915-0a52c600-2a5e-11e9-8039-41268238576c.gif\" width=\"33%\" alt=\"map\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52535013-e48e2f80-2d83-11e9-8886-ac0d2122d6af.png\" width=\"33%\" alt=\"parallel\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52348202-bb596080-2a5e-11e9-84a7-60732be0743a.gif\" width=\"33%\" alt=\"pie\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52533994-932b7380-2d76-11e9-93b4-0de3132eb941.gif\" width=\"33%\" alt=\"radar\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52348431-420e3d80-2a5f-11e9-8cab-7b415592dc77.gif\" width=\"33%\" alt=\"scatter\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52348737-01fb8a80-2a60-11e9-94ac-dacbd7b58811.png\" width=\"33%\" alt=\"wordCloud\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52433989-4f075b80-2b49-11e9-9979-ef32c2d17c96.gif\" width=\"33%\" alt=\"bar3D\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52464826-4baab900-2bb7-11e9-8299-776f5ee43670.gif\" width=\"33%\" alt=\"line3D\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52802261-8d0cfe00-30ba-11e9-8ae7-ae0773770a59.gif\" width=\"33%\" alt=\"sankey\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52464647-aee81b80-2bb6-11e9-864e-c544392e523a.gif\" width=\"33%\" alt=\"scatter3D\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52465183-a55fb300-2bb8-11e9-8c10-4519c4e3f758.gif\" width=\"33%\" alt=\"surface3D\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52798246-7ebae400-30b2-11e9-8489-6c10339c3429.gif\" width=\"33%\" alt=\"themeRiver\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/19553554/52349544-c2ce3900-2a61-11e9-82af-28aaaaae0d67.gif\" width=\"33%\" alt=\"overlap\"/\u003e\n\u003c/div\u003e\n\nFor more information, please refer to [handbook](https://go-echarts.github.io/go-echarts/), [go-echarts/examples](https://github.com/go-echarts/examples) and\nthe [GoDoc](https://pkg.go.dev/github.com/go-echarts/go-echarts/v2).\n\n### 💡 Contribution\n\ngo-echarts is an open source project and built on the top of other open-source projects.\nWelcome all the kinds of contributions. No matter it is for typo fix, bug fix or big new features.\nPlease do not hesitate to ask a question or send a pull request.\n\nWe strongly value documentation and integration with other projects, so we are very glad to accept improvements for\nthese\naspects.\n\n### ❤️ Contributors\n\n![contributors](https://contrib.rocks/image?repo=go-echarts/go-echarts)\n\n### 📃 License\n\nMIT [©go-echarts](https://github.com/go-echarts/go-echarts/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-echarts%2Fgo-echarts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-echarts%2Fgo-echarts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-echarts%2Fgo-echarts/lists"}