Unlock the power of AI in your dashboarding with Luzmo's AI powered chart creation. This feature empowers users to generate insightful charts from simple text prompts or browse suggested charts, simplifying and accelerating chart generation.
The feature can be used both via the user interface in our drag-and-drop dashboard editor and via API.
Navigate to the dashboard editor and use the "Add Item" button to open the dropdown menu. Next to the default items, you'll find two extra tabs: "Suggestions" and "Prompt". Before being able to use this feature, you or your Organization Owner might need to first enable AI features for your organization by clicking the "Enable AI features" button. Once enabled, both tabs are available to be used.
Enabling of AI features.
The "Suggestions" and "Prompt" tabs both feature a dataset selector at the top, where you can select the dataset context that will be used for chart generation. At the moment, only one dataset can be used as context at the same time.
In the "Suggestions" tab, our AI will generate a couple of charts it thinks would be interesting to visualize based on the dataset context. The "Regenerate" button can be used to generate a new set of suggestions. To add a suggested chart to the dashboard, hover over it and drag it to the dashboard canvas.
AI-generated chart suggestions for a demo Logistics dataset.
The "Prompt" tab provides a prompting tool where you can ask to generate a chart visualizing specific metrics, for example: "Show me passengers by port". This outputs a bar chart with the Port column in the Y-axis slot and the Passengers column in the measure slot. Drag the resulting chart to the dashboard canvas to add it to your dashboard.
If the generated chart does not satisfy your requirements, you can ask follow-up questions to further refine the chart or generate something completely different.
An example of a prompt and resulting chart for a demo Logistics dataset.
The Luzmo Embedded Dashboard Editor allows your end users to create and customize their own dashboards, next to viewing the ones you created. AI-powered chart creation assists users who may have less experience in dashboarding and visualizing metrics effectively.
By default, AI chart creation is enabled in the Embedded Dashboard Editor. To disable this feature, add !flag_ai_chart_generator to the feature_overrides array in your Embed token request. For more details on feature flags and their usage, refer to this article.
AI chart suggestions in the Embedded Dashboard Editor.
Because Luzmo is API first, it's also possible to closely integrate these features in your own stack via our API. More specifically, you can:
Example API call to generate chart suggestions for a dataset:
import Luzmo from '@luzmo/nodejs-sdk';
const client = new Luzmo({
api_key: '< your API key >',
api_token: '< your API token >'
});
const result = await client.create('aichart', {
type: 'generate-example-questions',
dataset_id: '< dataset ID >'
});
Example API call to generate a chart visualizing specific metrics on a dataset, based on a question:
import Luzmo from '@luzmo/nodejs-sdk';
const client = new Luzmo({
api_key: '< your API key >',
api_token: '< your API token >'
});
const result = await client.create('aichart', {
type: 'generate-chart',
dataset_id: '< dataset ID >'
question: 'Show me passengers by port'
});
For a full specification the API and example responses, please refer to the API endpoint documentation.