Line chart as PDF
Custom title, subtitle and colours; returns a PDF.
Input
{
"labels": [
"January",
"February",
"March",
"April",
"May",
"June",
"July"
],
"data": [
{
"label": "Expectations",
"values": [
30,
35,
58,
51,
81,
23,
77
],
"borderColor": "#a0a0a0",
"tension": 0.5,
"borderDash": [
5,
15
]
},
{
"label": "Value",
"values": [
10,
15,
38,
31,
91,
43,
67
],
"borderColor": "#FF9F40",
"fillColor": "#FF9F4033",
"tension": 0.5
},
{
"label": "Base Line",
"values": [
5,
10,
15,
20,
25,
30,
35
],
"borderColor": "#4BC0C0",
"fillColor": "#4BC0C033"
}
],
"options": {
… (18 more lines)Output · HTTP 200
{
"statusCode": 200,
"headers": {
"content-type": "application/pdf",
"content-disposition": "attachment; filename=\"result.pdf\""
}
}Show curl command
curl -X POST 'https://api.1001fx.com/charts/linechart' \
-H 'X-API-KEY: YOURSECRETAPIKEY' \
-H 'Content-Type: application/json' \
-d '{"labels":["January","February","March","April","May","June","July"],"data":[{"label":"Expectations","values":[30,35,58,51,81,23,77],"borderColor":"#a0a0a0","tension":0.5,"borderDash":[5,15]},{"label":"Value","values":[10,15,38,31,91,43,67],"borderColor":"#FF9F40","fillColor":"#FF9F4033","tension":0.5},{"label":"Base Line","values":[5,10,15,20,25,30,35],"borderColor":"#4BC0C0","fillColor":"#4BC0C033"}],"options":{"title":"Linechart Generation for Automation Platforms with 1001fx","titleAlignment":"center","titleColor":"#2563EB","subtitle":"Automatic linechart generation from as image and PDF. Highly customizable.","subtitleAlignment":"center","subtitleColor":"#333333","fontFamily":"Roboto","titleFontSize":20,"subtitleFontSize":16,"axisTitleFontSize":16,"axisFontSize":16,"dataLabelAnchor":"start","dataLabelAlignment":"top","dataLabelFontSize":16,"indexAxis":"x"},"outputFormat":"pdf"}'