chart.js mysql数据_使用AnyChart JS图表与Go和MySQL进行数据可视化的集成模板

8f0b2279ea490f341ff75dac33836e1e.png

Go basic template

This example shows how to use Anychart library with the Go programming language and MySQL database.

Running

To use this sample you must have Go installed as described here, and follow the official Go code organization; MySQL installed and running, if not please check out MySQL download page and follow these instructions.

To check your installations, run the following command in the command line:

$ go version

go version go1.7.1 linux/amd64 # sample output

$ mysql --version

mysql Ver 14.14 Distrib 5.5.52, for debian-linux-gnu (x86_64) using readline 6. # sample output

To start this example run commands listed below.

Clone the repository from github.com:

$ go get github.com/anychart-integrations/golang-http-mysql-template

Navigate to the repository folder:

cd $GOPATH/src/github.com/anychart-integrations/golang-http-mysql-template

Install dependencies:

$ go get ./...

Compile demo:

$ go install github.com/anychart-integrations/golang-http-mysql-template

$ go build

Set up MySQL database, use -u -p flags to provide username and password:

$ mysql < database_backup.sql

Run example:

$ golang-http-mysql-template

Workspace

Your workspace should look like:

$GOPATH/

bin/

pkg/

src/

github.com/

{user}/

golang-http-mysql-template/

public/

static/

css/

style.css # css file

templates/

index.html # html template

database_backup.sql # MySQL database dump

main.go # main Go code

README.md

Technologies

Language - Go

Database - MySQL

Web framework - net/http, html/template

Further Learning

License

AnyChart Go/MySQL integration sample includes two parts:

Code of the integration sample that allows to use Javascript library (in this case, AnyChart) with Go language and MySQL database. You can use, edit, modify it, use it with other Javascript libraries without any restrictions. It is released under Apache 2.0 License.

AnyChart JavaScript library. It is released under Commercial license. You can test this plugin with the trial version of AnyChart. Our trial version is not limited by time and doesn't contain any feature limitations. Check details here.

If you have any questions regarding licensing - please contact us. sales@anychart.com

2c1785961bf37c832e563ec6f43c2696.gif

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值