Getting and Editing Data Binding
Depending on the template that you have chosen for your data, you can assign columns for multiple purposes. For instance, you can specify which columns are aligned with the labels and which ones are aligned with the values. Use the following command to get default data binding API:
curl -X 'GET' \
'https://api.plotset.com/v1/chart/<Your chart id>/binding' \
-H 'accept: application/json' \
-H 'Authorization: <Your API Key>'
You can also incorporate the following to edit data binding:
curl -X 'PUT' \
'https://api.plotset.com/v1/chart/<Your chart id>/binding' \
-H 'accept: application/json' \
-H 'Authorization: <Your API Key>' \
-H 'Content-Type: application/json' \
-d '[
{
"field": "name",
"label": "label/time",
"default": "A",
"required": true,
"hint": ""
},
{
"field": "value",
"label": "value",
"default": "B-ZZ",
"required": true,
"hint": ""
}
]'
Now our chart looks like this:
We should edit the configs to make it more beautiful!