An Out-of-the-Box typesetting tool for dashboard. With chart data of dashboard, DashboardTypesetter can generate PDF automatically, in publishing quality.
The easiest way to run DashboardTypesetter is through Docker image:
docker run -d -p 3000:3000 shaochuancs/dashboard-typesetter
This image has a minimal TeX Live embedded, so you don't need to install anything else.
You can also run DashboardTypesetter from release code.
- Run
git clone https://github.com/shaochuancs/dashboard-typesetter-release.git
, or download release package. - Run
npm install
. This will take a few minutes, be patient. - Install TeX Live on server (if not yet)
- Run
npm start
to launch the service. The service will expose API on port 3000.
URL | HTTP Method | HTTP Content-Type | Description |
---|---|---|---|
/export | POST | application/json | Send dashboard data, and get generated PDF. |
Please refer to Swagger API document for detail description.
You can send POST request to DashboardTypesetter server, with title (optional), description (optional) and dashboard data (required), in following JSON format:
{
"title": "Your dashboard title",
"description": "The description of your dashboard",
"dashboard": {
"charts": [{
"library": "echarts",
"data": {
"option": {
// The option of this ECharts chart
...
}
},
"metadata": {
"title": "The title of this chart"
}
}, {
// Another chart
...
}, ...]
}
}
DashboardTypesetter server will parse this JSON and generate PDF. Here is the first page of an example PDF:
Sometimes you may want to generate PDF with two columns layout. You can declare layout
field as two_columns
in dashboard
, in JSON, to generate expected PDF:
{
"title": "Your dashboard title",
"description": "The description of your dashboard",
"dashboard": {
"layout": "two_columns",
"charts": [{
"library": "echarts",
"data": {
"option": {
// The option of this ECharts chart
...
}
},
"metadata": {
"title": "The title of this chart"
}
}, {
// Another chart
...
}, ...]
}
}
Here is the first page of an example two columns PDF:
DashboardTypesetter support following chart library:
- ECharts
I'm also providing customization service on dashboard/chart typesetting, please contact [email protected] if you are interested.
(The Proprietary License for DashboardTypesetter, free for commercial use)
Copyright (c) 2021-2022 Chuan Shao <[email protected]>