A template chart configuration file for you to use!
db Id | |
---|---|
dataquery-id | |
config-id | |
url | [https://api.notion-charts.app/embedded/chart/<config-id>?token=<your](https://api.notion-charts.app/embedded/chart/0fa8e57dc1de4da680c0327a09d58091?token=<your)-token> |
{
"database" :{
"id": ""
},
"chart": {
"title": [
{
"text": "",
"left": "center"
},
],
"tooltip": {
"show": true
},
"legend": {
"show": true,
"bottom": "5%"
},
"series" : [
{
"name": "",
"type": "pie",
"avoidLabelOverlap": false,
"itemStyle": {
"borderRadius": 10,
"borderColor": "#fff",
"borderWidth": 2
},
"label": {
"show": true
},
"emphasis": {
"label": {
"show": true,
"fontSize": "40",
"fontWeight": "bold"
}
},
"labelLine": {
"show": true
},
"data": []
}
]
},
"data_query": {
"id": ""
}
}
SELECT
DISTINCT "" as "name", -- Select the labels
count(*)::INT as "value",
FROM :database
WHERE 1=1
-- Add any filtering here
GROUP BY "name";