GoCharts is a library to assist with building charts, by directly working with charting libraries, generating tabular data for Excel XLSX files and CSV files, or to transfer data to/from analytics solutions like Metabase and SimpleKPI.
It includes two sets of packages:
- data structures to generically hold and manipulate different types of data
- chart library helpers to make generating charts eaiser, often times using data structures mentioned above
Commonly used data structures include:
- Table - easy manipulation of tabular data including writing to CSV and XLSX.
- Time Series - for building time-based line charts and bar charts.
- Histogram - for building histograms and bar charts.
A full list is available in the data
folder.
- C3 - code, project
- D3 - code, project
- Google Charts - code, project
- Rickshaw - code, project
- wcharczuk/go-chart - code, project
quicktemplate
is used for rendering some of the charts.
An example chart is the Rickshaw chart shown below:
Data collections are provided in the collections
folder for the primary purpose of providing example data to run in the examples. Currently, cryptocurrency data from Yahoo! Finance is included.
Various helpers to use applications are located in the apps
folder for the primary purpose of providing reusable and example code.
$ go get github.com/grokify/gocharts/v2/...
See the example here: