52

GitHub - chenjiandongx/go-echarts: ? The adorable charts library for Golang

 5 years ago
source link: https://github.com/chenjiandongx/go-echarts
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

README.md

52535979-c0d0e680-2d8f-11e9-85c8-2e9f659e7c6f.png

go-echarts

? The adorable charts library for Golang

Build Status Build Status Go Report Card MIT License

如果一门语言可以用来写爬虫,那么它就需要一个优雅的数据可视化库。 ---沃.兹基硕德

在 Golang 这门语言中,目前数据可视化的第三方库还是特别少,go-echarts 的开发就是为了填补这部分的空隙。Echarts 是百度开源的非常优秀的可视化图表库,凭借着良好的交互性,精巧的图表设计,得到了众多开发者的认可。也有其他语言为其实现了相应语言版本的接口,如 Python 的 pyecharts,go-echarts 也是借鉴了 pyecharts 的一些设计思想。

? 安装

$ go get -u github.com/chenjiandongx/go-echarts/...

✨ 特性

  • 简洁的 API 设计,使用如丝滑般流畅
  • 囊括了 20+ 种常见图表,应有尽有
  • 高度灵活的配置项,可轻松搭配出精美的图表
  • 详细的文档和示例,帮助开发者更快的上手项目
  • 多达 400+ 地图,为地理数据可视化提供强有力的支持

? 使用

仅需要几行核心代码就可画出美观的图表

52524229-bf42e800-2cd5-11e9-9eb8-47d8e3f4052b.png

生成的 bar.html 是这样的。Cool!

52524101-34152280-2cd4-11e9-87c6-bbf5e388fe23.png

当然你也可以使用更加 golang 的方式,利用 net/http

52524272-2c567d80-2cd6-11e9-8a73-29ba059b8bb5.png

打开浏览器访问 http://localhost:8081 也可以看到同样的效果!

? Demo

bar boxplot effectScatter funnel gague geo heatmap kline line liquid map parallel pie radar scatter wordCloud bar3D line3D scatter3D surface3D overlap

运行 example/main.go 可预览所有示例

$ cd your/gopath/src/github.com/chenjiandongx/go-echarts/example
$ go build .
$ ./example

了解更多文档的内容请访问 go-echarts.chenjiandongx.com

? LICENSE

MIT ©chenjiandongx


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK