Overview

Building insightful dashboard panels no longer requires manual query configuration. With the AI Assistant, you can describe the data you want to see in plain English, and the system will automatically generate the appropriate QL (Query Language) query and recommend the best visualization—whether it’s a bar chart, line graph, or pie chart.

The assistant analyzes your request to determine the correct entity, aggregations, and grouping logic, allowing you to go from a question to a visualization in seconds.


How to generate a chart with AI

Follow these steps to create or update a dashboard panel using natural language.

1. Open [navigate:/dashboard|Dashboard|database] in the left navigation.
2. Click the **Settings** icon on a dashboard panel to open the configuration modal.
3. Locate the **Generate with AI** section at the top of the modal.
4. Enter your request in the text box. For example: "Show me total sales by brand this month".
5. Click the **Generate** button (or press Enter).
6. The assistant will populate the **Query** and **Chart** tabs with the generated logic and recommended visualization.
7. Review the generated configuration and click **Save** to apply it to your dashboard.

Example Use Cases

The AI Assistant can handle a wide range of analytical requests:

  • Sales Trends: “Monthly revenue trend for the last 12 months” → Generates a line chart grouped by month.
  • Inventory Analysis: “Total stock value grouped by category” → Generates a bar chart showing the sum of stock * price.
  • Market Share: “Top 5 brands by product count” → Generates a pie or donut chart.
  • Performance Tracking: “Average price of products added this week vs last week” → Generates a comparison visualization.

Refining Your Results

If the initial result isn’t exactly what you need, you have several ways to refine it:

Iterate with AI

Click the Iterate with AI [badge:Beta|warning] button (the message icon next to the generate button) to open a chat interface. You can then ask for specific adjustments like “Change the chart to a stacked bar” or “Filter out products with zero stock”.

Manual Adjustments

You can always switch to the Query or Chart tabs to manually tweak the generated logic:

  • Query Tab: Adjust filters, grouping fields, or sort order.
  • Chart Tab: Manually select a different chart type (Bar, Stacked Bar, Line, Area, Pie, Donut, Scatter, or Table).

Troubleshooting

**Data Context:** The AI Assistant works best when you use terms that match your system's field names. If you get unexpected results, try being more specific about the fields you want to use.

“No data returned”

If your chart is empty, the generated filter might be too restrictive. Check the where clause in the Query tab to see if it’s filtering out all records.

“Cluttered visualization”

If a bar chart has too many bars to be readable, try asking the assistant to “Show only the top 10” or “Group by a broader category”.

“Incorrect chart type”

The assistant recommends a chart type based on the data structure, but you can always override this in the Chart tab if you prefer a different visualization style.

**Tip:** You can combine multiple conditions in one request, such as "Show me total sales for Nike products in the 'Shoes' category grouped by month".

[try:/dashboard|Go to Dashboard|database]