Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
D3 | 106,319 | 23,721 | 5,935 | 2 days ago | 272 | June 03, 2023 | 7 | isc | Shell | |
Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada: | ||||||||||
Echarts | 56,415 | 4 | 21 hours ago | 12 | January 27, 2021 | 2,382 | apache-2.0 | TypeScript | ||
Apache ECharts is a powerful, interactive charting and data visualization library for browser | ||||||||||
Visx | 17,764 | 86 | 7 days ago | 32 | July 11, 2023 | 136 | mit | TypeScript | ||
🐯 visx | visualization components | ||||||||||
Excelize | 15,993 | 357 | 16 hours ago | 186 | April 09, 2023 | 87 | bsd-3-clause | Go | ||
Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets | ||||||||||
Plotly.js | 15,988 | 718 | 247 | a day ago | 239 | July 25, 2023 | 1,501 | mit | JavaScript | |
Open-source JavaScript charting library behind Plotly and Dash | ||||||||||
Plotly.py | 14,133 | 45 | 8 days ago | 89 | October 29, 2022 | 1,423 | mit | Python | ||
The interactive graphing library for Python :sparkles: This project now includes Plotly Express! | ||||||||||
Apexcharts.js | 12,866 | 377 | 461 | 7 days ago | 201 | July 31, 2023 | 294 | mit | JavaScript | |
📊 Interactive JavaScript Charts built on SVG | ||||||||||
G2 | 11,742 | 530 | 292 | 20 hours ago | 326 | August 02, 2023 | 111 | mit | TypeScript | |
📊 A concise and progressive visualization grammar. | ||||||||||
Sampler | 11,692 | a month ago | 1 | January 19, 2021 | 52 | gpl-3.0 | Go | |||
Tool for shell commands execution, visualization and alerting. Configured with a simple YAML file. | ||||||||||
Victory | 10,489 | 686 | 232 | 17 days ago | 236 | June 13, 2023 | 289 | other | JavaScript | |
A collection of composable React components for building interactive data visualizations |
🎨 The adorable charts library for Golang.
If a language can be used to build web scrapers, it definitely needs to provide a graceful data visualization library. --- by dongdong.
In the Golang ecosystem, there are not many choices for data visualization libraries. The development of go-echarts aims to provide a simple yet powerful data visualization library for Golang. Apache ECharts is an outstanding charting and visualization library, it supports adorable chart types and various interactive features. There are many language bindings for Echarts, for example, pyecharts. go-echarts learns from pyecharts and has evolved a lot.
Classic way to get go-echarts
# this may be a stupid way to use v2 go-echarts without gomod(GO111MODULE=off) because of
# the next generation version management system... 🐶
# if you get a better workaround, please let me know....
$ go get -u github.com/go-echarts/go-echarts/...
$ cd $go-echarts-project
$ mkdir v2 && mv charts components datasets opts render templates types v2
Use gomod style
$ go get -u github.com/go-echarts/go-echarts/v2/...
OR
# go.mod
require github.com/go-echarts/go-echarts/v2
The go-echarts project is being developed under v2 version and the active codebase is on the master branch now.
v1 and v2 are incompatible which means that you cannot upgrade go-echarts from v1 to v2 smoothly. But I think it is worth trying that new version.
It's easy to get started with go-echarts. In this example, we create a simple bar chart with only a few lines of code.
package main
import (
"math/rand"
"os"
"github.com/go-echarts/go-echarts/v2/charts"
"github.com/go-echarts/go-echarts/v2/opts"
)
// generate random data for bar chart
func generateBarItems() []opts.BarData {
items := make([]opts.BarData, 0)
for i := 0; i < 7; i++ {
items = append(items, opts.BarData{Value: rand.Intn(300)})
}
return items
}
func main() {
// create a new bar instance
bar := charts.NewBar()
// set some global options like Title/Legend/ToolTip or anything else
bar.SetGlobalOptions(charts.WithTitleOpts(opts.Title{
Title: "My first bar chart generated by go-echarts",
Subtitle: "It's extremely easy to use, right?",
}))
// Put data into instance
bar.SetXAxis([]string{"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}).
AddSeries("Category A", generateBarItems()).
AddSeries("Category B", generateBarItems())
// Where the magic happens
f, _ := os.Create("bar.html")
bar.Render(f)
}
And the generated bar.html is rendered as below. Isn't that cool!
Of course we can also start a listening web server with net/http.
package main
import (
"math/rand"
"net/http"
"github.com/go-echarts/go-echarts/v2/charts"
"github.com/go-echarts/go-echarts/v2/opts"
"github.com/go-echarts/go-echarts/v2/types"
)
// generate random data for line chart
func generateLineItems() []opts.LineData {
items := make([]opts.LineData, 0)
for i := 0; i < 7; i++ {
items = append(items, opts.LineData{Value: rand.Intn(300)})
}
return items
}
func httpserver(w http.ResponseWriter, _ *http.Request) {
// create a new line instance
line := charts.NewLine()
// set some global options like Title/Legend/ToolTip or anything else
line.SetGlobalOptions(
charts.WithInitializationOpts(opts.Initialization{Theme: types.ThemeWesteros}),
charts.WithTitleOpts(opts.Title{
Title: "Line example in Westeros theme",
Subtitle: "Line chart rendered by the http server this time",
}))
// Put data into instance
line.SetXAxis([]string{"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}).
AddSeries("Category A", generateLineItems()).
AddSeries("Category B", generateLineItems()).
SetSeriesOptions(charts.WithLineChartOpts(opts.LineChart{Smooth: true}))
line.Render(w)
}
func main() {
http.HandleFunc("/", httpserver)
http.ListenAndServe(":8081", nil)
}
For more information, please refer to go-echarts/examples and the GoDoc.
go-echarts is an open source project and built on the top of other open-source projects, hence we are always very happy to have contributions, whether for typo fix, bug fix or big new features. Please do not ever hesitate to ask a question or send a pull request.
We strongly value documentation and integration with other projects so we are very glad to accept improvements for these aspects.
Code with ❤️ by chenjiandongx / Koooooo-7 and lovely contributors
MIT ©chenjiandongx