Categorygithub.com/giannimassi/go-echarts-ws
modulepackage
0.1.0
Repository: https://github.com/giannimassi/go-echarts-ws.git
Documentation: pkg.go.dev

# README

go-echarts-ws

A simple wrapper for quickly setting up a web page with a chart updated via websocket and rendered with github.com/go-echarts/go-echarts.

Installation

To use this module in your project:

go get -u github.com/giannimassi.go-echarts-ws

Example

To try out the example:

go run examples/line/main.go

This will start a web server that shows simple line graph updated with a new value every second.

Note

This is currently just a toy for the author to do some quick visualization. Feel free to get in touch with me if you think it would be worth to spend some time on this to make it useful outside of the current scope.

# Packages

No description provided by the author

# Functions

Handler returns the ws handlers TODO: handle multiple subcriber.
Render executed the Renderer Render function and adds the script required for updating data via websocket.

# Variables

ScriptFmt is the template used for rendering ws-enabled charts.