forked from https://github.com/crazyminy/chart-server
Server side graph rendering is done by this simple API server
What is supported:
- echarts
- more to come
How it works:
Puppeteer is used as a headless browser to render the picture, and the base64 code of the generated picture is returned.
request
{
"width":700,
"height":600,
"options":{
"title":{
"text":"ECharts demo"
},
"tooltip":{
},
"legend":{
"data":[
"fruits"
]
},
"xAxis":{
"data":[
"apple",
"orange",
"banana",
"mango",
"guava",
"lychee"
]
},
"yAxis":{
},
"series":[
{
"name":"amount",
"type":"bar",
"data":[
5,
20,
36,
10,
10,
20
]
}
]
}
}
Response
data:image/svg xml;charset=UTF-8,
Port
The service runs on port 13705 for now. Will add configurable port later on http://localhost:13705/echarts
Milestones
-
GRPC support? maybe
-
D3.js ? maybe
-
amcharts ? maybe
-
configurable http port