Chart

Create charts for your web & mobile apps, chat bots, and emails from data in the URL.

Area Chart

GET /chart/area

Request

Parameter Description Type Required Default
labels Comma separated labels for x axis String Yes
values Comma separated values for y axis, use | to separate multiple series String Yes
titles Comma separated titles for series String No
colors Comma separated colors for series String No
title Chart title String No
x_title Chart x axis title String No
y_title Chart y axis title String No
dpi Controls chart size String No 150

Response

Description Type
Chart image Binary

Example

https://api.labstack.com/chart/area?values=1000,1170,660,1030,800|400,460,1120,540,700&labels=2011,2012,2013,2014,2015&titles=Sales,Expenses&colors=lightseagreen,orangered&title=Company Performance&x_title=Year

GET /chart/bar

Bar Chart

Request

Response

Example

https://api.labstack.com/chart/bar?values=1000,1170,660,1030,800|400,460,1120,540,700&labels=2011,2012,2013,2014,2015&titles=Sales,Expenses&colors=lightseagreen,orangered&title=Company%20Performance&x_title=Year

Line Chart

GET /chart/line

Request

Response

Example

https://api.labstack.com/chart/line?values=1000,1170,660,1030,800|400,460,1120,540,700&labels=2011,2012,2013,2014,2015&titles=Sales,Expenses&colors=lightseagreen,orangered&title=Company%20Performance&x_title=Year

Pie Chart

GET /chart/pie

Request

Parameter Description Type Required Default
labels Comma separated labels for x axis String Yes
values Comma separated values for y axis, use | to separate multiple series String Yes
titles Comma separated titles for series String No
colors Comma separated colors for series String No
title Chart title String No
dpi Controls chart size String No 150

Response

Description Type
Chart image Binary

Example

https://api.labstack.com/chart/pie?values=58,16,3.1,7.9&labels=2011,2012,2013,2014,2015&titles=Sales,Expenses&colors=lightseagreen,orangered&title=Company%20Performance&x_title=Year

© 2018 LabStack. All Rights Reserved.