When you need a chart or dashboard that highlights the key message clearly.
Pie and Donut Chart for Composition AI Prompt
Pie and Donut Chart for Composition is a beginner prompt for visualization. This prompt helps the AI turn raw data into charts or dashboards that communicate insight clearly. It goes beyond simply plotting values by asking for chart choice, layout, annotations, and business interpretation. Use it when you need visuals that are ready for exploration, reporting, or stakeholder communication. It is best suited for direct execution against a real dataset. The requested output should remain approachable and easy to review, even for someone with limited analytical background.
Create a composition chart showing how a total is broken down across categories:
1. Identify the best categorical column for the breakdown (5–8 categories ideal)
2. Calculate each category's share of the total
3. Create a donut chart (not a pie — donut is cleaner and leaves room for a center label)
4. Place the total value and a label ('Total [metric]') in the center of the donut
5. Show percentage labels on each segment, but only if the segment is larger than 3% (suppress tiny labels)
6. Group all segments smaller than 2% into an 'Other' category
7. Use a qualitative color palette — no gradients, each category a distinct color
8. Add a clean legend outside the chart
Also create a companion table showing: category, count, percentage, ranked from largest to smallest.When to use this prompt
When a table alone is not enough for stakeholders to understand the result.
When you want a presentation-ready visual with labels, annotations, and styling guidance.
When comparing segments, trends, correlations, or composition visually.
What the AI should return
The AI should return the recommended chart specification, plotting code when appropriate, and a short interpretation of what the visual is meant to show. Titles, labels, annotations, and layout choices should be explicit so the output is presentation-ready rather than generic. If multiple charts are requested, they should be organized in a logical order and tied back to a single story. The final answer should make it clear what the viewer should notice first.
How to use this prompt
Open your data context
Load your dataset, notebook, or working environment so the AI can operate on the actual project context.
Copy the prompt text
Use the copy button above and paste the prompt into the AI assistant or prompt input area.
Review the output critically
Check whether the result matches your data, assumptions, and desired format before moving on.
Chain into the next prompt
Once you have the first result, continue deeper with related prompts in Visualization.
Frequently asked questions
What does the Pie and Donut Chart for Composition prompt do?+
It gives you a structured visualization starting point for data analyst work and helps you move faster without starting from a blank page.
Who is this prompt for?+
It is designed for data analyst workflows and marked as beginner, so it works well as a guided starting point for that level of experience.
What type of prompt is this?+
Pie and Donut Chart for Composition is a single prompt. You can copy it as-is, adapt it, or use it as one step inside a larger workflow.
Can I use this outside MLJAR Studio?+
Yes. The prompt text works in other AI tools too, but MLJAR Studio is the best fit when you want local execution, visible Python code, and reusable notebooks.
What should I open next?+
Natural next steps from here are Auto Exploratory Dashboard, Bar Chart with Ranking, Correlation Heatmap.