Retrieve AI-generated chart suggestions based on the structure of a specified dataset and optionally a user-specified prompt.
To use AI-generated charts, an Organization Owner must enable the experimental feature in the Organization profile. When using Luzmo AI, we may send dataset metadata like column names and descriptions to OpenAI. Row-level data from your sets is never shared.
Find potential use cases on our blog .
The chart generator can currently create charts of the following types: area-chart , bar-chart , bubble-chart , circle-pack-chart , column-chart , donut-chart , line-chart , evolution-number , pivot-table , regular-table , scatter-plot , sunburst-chart and treemap-chart and filters of the following types: date-filter , dropdown-filter , slicer-filter and slider-filter . The generator can suggest chart types automatically based on the context or you can guide it to a particular type. Chart option support is continuously expanding.
npm install @luzmo/nodejs-sdk{
"generatedChart": {
"type": "bar-chart",
"position": {
"sizeX": 24,
"sizeY": 28,
"row": 0,
"col": 0
},
"title": {},
"options": {
"title": {
"en": "Cheesyness by Recipe"
}
},
"content": {},
"slots": [
{
"name": "y-axis",
"content": [
{
"type": "numeric",
"format": ",.2f",
"label": "cheesyness",
"columnId": "99909a5d-aa8f-405b-8325-2d30b67af583",
"datasetId": "d75f3d79-ae27-4007-8653-19b22db79bbd"
}
]
},
{
"name": "measure",
"content": []
},
{
"name": "legend",
"content": [
{
"type": "hierarchy",
"label": "recipe",
"columnId": "ec281a85-7def-4603-819f-408835780aa9",
"datasetId": "d75f3d79-ae27-4007-8653-19b22db79bbd"
}
]
}
],
"aichartId": "303768d2-ff51-4e11-82c8-dffc8691ff48"
},
"question": "Visualize burrito cheesyness by recipe",
"functionCall": "createBarChart",
"functionResponse": {
"title": "Cheesyness by Recipe",
"s__y-axis": [
{
"id": "0"
}
],
"s__measure": [],
"s__legend": [
{
"id": "10"
}
]
}
}