echarts to display the datafusion SQL
This commit is contained in:
28
graphs/README.md
Normal file
28
graphs/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Analytics graphs
|
||||
|
||||
A small Rust web server that forwards SQL queries to `AnalyticsService.ExecuteAnalyticsQuery`
|
||||
and displays the streamed result with ECharts.
|
||||
|
||||
## Run
|
||||
|
||||
Start the main komp_ac gRPC server, then run:
|
||||
|
||||
```sh
|
||||
cargo run
|
||||
```
|
||||
|
||||
Open <http://127.0.0.1:3000>. The default gRPC endpoint is
|
||||
`http://[::1]:50051`. Both addresses can be changed:
|
||||
|
||||
```sh
|
||||
ANALYTICS_GRPC_ENDPOINT=http://127.0.0.1:50051 \
|
||||
LISTEN_ADDRESS=127.0.0.1:8080 \
|
||||
cargo run
|
||||
```
|
||||
|
||||
The first SQL result column is used for category labels. Bar and line charts use
|
||||
all remaining columns as numeric series, pie uses the second column, and scatter
|
||||
uses the first two columns. Table view displays every returned value.
|
||||
|
||||
ECharts is loaded from jsDelivr, so the browser needs network access when opening
|
||||
the page.
|
||||
Reference in New Issue
Block a user