Pie Chart
Definition
The Pie Chart Widget is a powerful visualization tool in Zenphi Dashboards that displays proportional data distribution in the form of a circular chart. Each slice of the pie represents a portion of the whole, giving users an immediate, intuitive understanding of how different segments contribute to a total.
This widget is ideal for summarizing categorical data or grouped numeric values and answering key questions like:
- What category holds the largest share?
- How does one group compare to others?
- What are the relative proportions of each option?
The Pie Chart can be customized as a traditional pie or a donut chart, and supports precision styling, color palettes, and conditional filtering to present exactly the data your audience needs to see. It’s especially valuable for summarizing high-level data trends at a glance, while remaining interactive and user-friendly.
🔑 Key Capabilities
- Visualize composition of any dataset, like sales by product, tasks by status, or users by role.
- Slice data by discrete values (like category names) or continuous intervals (like score ranges).
- Size the pie slices by aggregated numeric or textual values (count, sum, average, etc.).
- Style the chart to match your brand and dashboard aesthetic using custom color palettes, pie/donut format, and detailed appearance controls.
- Apply advanced filter conditions to show data dynamically based on the current user, date range, team, or other attributes.
📊 Example Use Cases
Pie Chart widgets are perfect for visualizing distribution, proportions, and comparisons across categories. Here are some powerful real-world scenarios where Pie Charts add immediate clarity and insight:
1. Task Distribution by Status
Show the number of tasks currently in different stages (e.g., To Do, In Progress, Completed) for a project or across teams. Useful for quickly identifying bottlenecks or backlog.
2. Ticket Volume by Department
Visualize support or service tickets broken down by department (e.g., Sales, IT, HR). Helps leadership see which departments have the highest workload and may need more resources.
3. Leads by Source
In a sales dashboard, break down leads by source (e.g., Website, Referral, Ad Campaigns) to better understand which marketing channels are performing best.
4. Expense Categories
For finance dashboards, show total expenses categorized by type (e.g., Software, Travel, Equipment) to quickly spot spending trends.
5. Employee Count by Location
Show headcount by office or region using HR data to visualize team distribution geographically or by branch.
6. Feedback Sentiment Split
Analyze feedback or survey results by sentiment (e.g., Positive, Neutral, Negative) using categorized data fields.
7. Personalized Record Breakdown
Create a user-specific view where each employee sees the proportion of their own tasks by priority or status. This uses dynamic filtering with
{{CurrentUserEmail}}
to personalize the chart per viewer.
⚙️ Configuration
The Pie Chart widget configuration defines how your data will be grouped, measured, and visually presented. You’ll configure three primary elements: Data Source, Slice By, and Size By. Each plays a critical role in shaping how the pie chart is rendered, and the insights it provides.
1️⃣ Data Source
This is the table from which the pie chart pulls its data.
- Select any of your available Zenphi Tables.
- The fields (columns) of this table will then become available for slicing and sizing the pie chart.
Example: If you want to show a breakdown of tasks by status, select your “Tasks” table.
2️⃣ Slice By
This section determines how your data is grouped into slices of the pie. You select:
-
Data field: A column from your table that represents the grouping key.
-
Function: Defines how to interpret the values in that field:
- If the field is a number: choose between
Top Values
orIntervals
- If the field is a string: only
Top Values
is available
- If the field is a number: choose between
🍰 Option A: Top Values
Use Top Values when you want to show the most frequent or highest-value items.
⚙️ Options under Top Values:
-
Number of Values: Specify how many top groups to show (e.g., top 5). Remaining groups will be merged into an “Other” slice.
-
Sorting Options:
- Alphabetically (A→Z or Z→A)
- By Size By metric (e.g., sum, count)
Use case: Slice tasks by "Status" and show the top 4 statuses by task count.
📈 Option B: Intervals (only for numeric fields)
Use Intervals to group numerical ranges (e.g., scores from 0–20, 21–40).
🧠 Automatic Intervals (default):
-
Zenphi automatically generates even intervals based on your range.
-
You can configure:
- Precision (e.g., 2 → 1.25 becomes 1.25)
- Thousands Separator (1,000 vs 1000)
- Prefix/Suffix for interval titles (e.g.,
$
orpoints
) - Order of intervals (ascending or descending)
Example: Show intervals of employee scores between 0 and 100, automatically split into 5 ranges.
✍️ Define Custom Intervals (when enabled):
-
Manually create your intervals:
- Give each a title
- Set Start and End values
-
You have full control over naming, structure, and meaning of each group.
Example:
- “Low performers” → 0–50
- “Average performers” → 51–75
- “Top performers” → 76–100
Best practice: Always make the last interval inclusive of the max value for clarity.
3️⃣ Size By
This setting determines how big each slice is, relative to the data inside it.
-
Field: Choose a field (column) from the table.
-
Function: Based on the field type:
- If the field is numeric: choose from
Count
,Average
,Maximum
,Minimum
,Median
,Unique Count
- If the field is text: choose from
Count
,Unique Count
- If the field is numeric: choose from
Example: Slice by “Status” and size by the sum of Estimated Hours.
🎨 Optional Display Settings for Slice Hover:
When users hover over a slice, you can control how the values are presented:
- Show Percentage: Toggle to show what portion of the pie that slice represents.
- Thousand Separator: Choose whether to format large numbers (e.g., 1,000).
- Precision: Set the number of decimal places to show (e.g., 2 → 15.75).
- Prefix/Suffix: Add extra context to numbers (e.g.,
$
, “points”, “hours”).
Example: Hovering over a slice might display:
45 hours (25.3%)
or$12,000 (18%)
Real-World Example
Slice by: Status → Top 4Size by: Estimated Hours → SumResult: A pie chart showing how much time each status category (e.g., To Do, In Progress, Done) consumes relative to the total.
Understanding the Difference Between “Slice By” and “Size By”
When configuring a Pie Chart widget, you’ll notice you need to select two different fields and two different functions—once under Slice By, and once under Size By.
This is by design. Each plays a very different role:
1️⃣ Slice By – How to Group the Data
This determines how the pie is divided into slices.
- Think of it as: “What are the categories I want to compare?”
- You choose a column (e.g.,
Status
,Department
,Score
) and optionally define how to group that column (e.g., Top Values or Ranges). - The result: Zenphi creates distinct slices in the chart, each representing one group/category.
Examples:
- Slice by
Status
(e.g., To Do, In Progress, Done)- Slice by
Department
(e.g., HR, Finance, Ops)- Slice by
Score
intervals (e.g., 0–50, 51–75, 76–100)
2️⃣ Size By – How Big Each Slice Is
This determines how much space each slice takes up on the chart.
-
Think of it as: “What should determine the size of each group?”
-
You pick a column and apply a function to it, like:
Count
(how many records are in each group),Sum
(total of numeric values),Average
,Max
, etc.
-
The result: Each slice will be proportional to this measurement.
Examples:
- Size by
Estimated Hours
→ total hours per status- Size by
Cost
→ total spend per department- Size by record
Count
→ number of items in each category
🔄 How They Work Together
Think of “Slice By” as the question you're asking, and “Size By” as the way you measure the answer.
You want to know... | Slice By | Size By |
---|---|---|
How total hours are distributed by status | Status | Estimated Hours → Sum |
How many tasks are in each department | Department | → Count of Records |
How total spend varies by vendor rating | Rating (range) | Spend → Sum |
❗ Tips to Avoid Confusion
-
Don’t select the same field for both Slice and Size unless it’s intentional.
-
Always ask:
- “What are the groups I want to compare?” → Slice By
- “How do I want to measure each group?” → Size By
-
If your goal is a simple count of records per category, just:
- Slice by a field like
Status
- Size by any field with the
Count
function
- Slice by a field like
🎨 Appearance
The Appearance section of the Pie Chart widget allows you to fine-tune how the widget is visually displayed within the dashboard. From structural layout to aesthetic elements like color and formatting, these settings help ensure your chart looks polished, purposeful, and contextually clear to viewers.
Widget Border
-
**Show Widget Border?**Toggle this option to define how the widget visually integrates into your dashboard layout:
- ✅ Enabled: The widget is displayed as a section with a visible border and spacing, making it feel like an independent module.
- ❌ Disabled: The widget appears seamlessly integrated—flush with other elements—with no border or spacing, ideal for dense layouts or embedded visuals.
Widget Titles
The Pie Chart widget supports three distinct titles, each serving a specific purpose in different parts of the UI:
-
Widget Title (Top Header)
- Controlled by the Show Widget Title? toggle.
- Appears at the top of the widget box, acting as a headline for the entire chart.
- Use this to label what the chart represents (e.g., “Tasks by Status”, “Budget Allocation”).
-
Interval Titles (From Slice By Section)
-
When automatic intervals are used (e.g., ranges like 0–50, 51–100), the system generates titles for each range.
-
These titles appear in the corner legend of the pie chart, with corresponding colors.
-
You can customize the format of these labels using:
-
Thousand Separator?
-
Precision (number of decimal places)
-
Prefix (e.g.,
Score:
) -
Suffix (e.g.,
pts
)
-
Example: If your intervals are based on a
Score
column, one title might be"Score: 51 - 100 pts"
. -
-
Hover Value Titles (From Size By Section)
-
These appear as tooltips when users hover over each slice.
-
You can customize the values shown here (e.g., counts, sums, etc.) using:
-
Show Percentage (toggle to include % share of whole)
-
Thousand Separator?
-
Precision
-
Prefix/Suffix
-
Example: Hovering over a slice could show:
"Total: $1,300"
or"Items: 43%"
. -
“Hide Other” Option
-
Hide Other?
-
When slicing by “Top Values” and your data has more values than the allowed number, Zenphi aggregates the extras into a single “Other” slice.
-
If you want to hide this “Other” slice altogether, enable this option.
-
Useful when you only want to focus on the most impactful segments.
Example: If you slice by Vendor and limit to 5, any 6th+ vendor gets grouped into “Other”—unless this is hidden.
-
Style Customization
The Style section empowers you to control the look and feel of your chart to match brand, data clarity, or design goals:
Color Palette
- You can choose a color palette to represent different slices.
- Colors are mapped in order to the sorted slices.
- Make sure the color contrast supports readability—especially when slice count is high.
Chart Type
- Pie – A classic full-circle chart.
- Donut – Similar to pie but with a center hole, allowing a more modern and space-conscious visualization.
The donut format is especially useful if you're displaying a value or summary in the center (e.g., “Total: 400 tasks”).
Summary of Key Appearance Settings
Setting | Description |
---|---|
Show Widget Border? | Toggle border for compact or framed display |
Show Widget Title? | Toggle top widget title |
Interval Titles (Slice By) | Controls label format for each interval slice |
Hover Value Titles (Size By) | Controls tooltip value format |
Hide Other? | Option to exclude aggregated "Other" category |
Chart Type | Pie or Donut layout |
Color Palette | Customize slice colors |
Filter Conditions
The Filter Conditions section enables you to control what subset of data from the connected table is used in your Pie Chart widget. This is especially useful for creating personalized, role-based, or purpose-driven visualizations that show only relevant segments of your data.
What Filters Can Do
Using filters, you can:
- Display data only for specific users or teams (e.g., “Only show my records”)
- Narrow down the chart to a certain date range or status
- Exclude invalid or empty records
- Provide role-based views of the same data source
You can apply multiple filters using AND/OR logic to create highly specific queries.
How It Works
Each condition is defined by three parts:
- Field – A column from your selected data source table.
- Operator – The logical condition to apply.
- Value – A hardcoded value or a dynamic token (e.g., current user info).
Available Operators
Operator | Description |
---|---|
equal to | Exact match (Status equal to Completed ) |
not equal to | Excludes exact matches (Team not equal to Marketing ) |
contains | Field includes the given value (Tags contains Urgent ) |
not contains | Field does NOT include the value (Title not contains Draft ) |
starts with | Field begins with the value (Name starts with A ) |
ends with | Field ends with the value (Email ends with .org ) |
has none of | For multiselect fields — none of the listed values are present |
is null | The field is empty or unfilled |
is not null | The field has any value (not empty) |
Dynamic Values via Token Picker
You can use dynamic tokens to make your chart responsive to the viewer’s identity or role.
The token picker allows you to use:
- Current User ID
- Current User Email
- Current User Name
- Current User Attributes (e.g.,
Is Admin
,Department
, etc.)
This makes personalized charts possible—for example, "Show only tasks assigned to the logged-in user."
Example Filter Conditions
Here are some practical examples of how to use filters in a Pie Chart widget:
Example 1: Only Show Active Records
Field | Operator | Value |
---|---|---|
Status | equal to | Active |
📝 This ensures the chart only visualizes currently active records.
Example 2: Personalized View for Logged-In User
Field | Operator | Value |
---|---|---|
Email | equal to | {{CurrentUserEmail}} |
📝 This will show only the records that belong to the current user viewing the dashboard.
Example 3: Include Only High-Priority Tickets
Field | Operator | contains | Value |
---|---|---|---|
Priority | contains | High |
📝 Perfect for filtering tickets or tasks by severity or urgency.
Example 4: Combine Conditions with AND Logic
Field | Operator | Value |
---|---|---|
Team | equal to | Sales |
Status | not equal to | Closed |
📝 Only open records from the Sales team.
Example 5: Use OR Logic for Broader Scope
Condition Group (OR):
Status
isPending
Status
isIn Progress
📝 Displays records that are either pending or currently being worked on.
Example 6: Clean Up with Null Checks
Field | Operator | Value |
---|---|---|
Due Date | is not null |
📝 Excludes records with missing due dates for cleaner charting.
Example Scenario: Sales Revenue by Product Category
Imagine you're building a Sales Dashboard to visualize how much revenue each product category has generated this quarter.
You have a table named SalesRecords
with these relevant fields:
Product Category
(e.g., Electronics, Furniture, Clothing)Order Amount
(numeric – revenue from each order)Salesperson
Customer Region
Order Date
You want the Pie Chart to show how revenue is distributed across different product categories — not just the number of sales.
Widget Configuration
🔹 Data Source
- Table:
SalesRecords
🔹 Slice By
- Field:
Product Category
- Function:
Top Values
- Number of values: 5
- Sort by: **Size by (descending)**This splits the pie into slices by category (like Electronics, Furniture…), based on total revenue.
🔹 Size By
- Field:
Order Amount
- Function:
Sum
This determines the size of each slice — it will reflect the total sales revenue, not just the number of orders.
So instead of each slice being one order, or having equal weight, it reflects how much each category contributed in dollars.
Why this is powerful?
If you had instead used Count
for size by, the chart would show how many orders per category. That’s fine if every order is similar.But using Sum of Order Amount
shows which categories actually made you more money, even if one had fewer high-ticket sales.
Appearance
- Chart Type: Donut
- Show Widget Title: ✅ "Sales by Product Category"
- Prefix: "$", Precision: 0 (for clean dollar formatting)
- Color Palette: Vibrant / Category-Based
Outcome
Each salesperson or manager viewing the dashboard can immediately see which product categories are performing best in revenue terms, which is far more actionable than just count.
Optional Filter Condition
To personalize:
- Field:
Salesperson
- Condition: Equal to
- Value:
{{CurrentUserEmail}}
So each logged-in user sees their own sales revenue breakdown by category.
Updated about 17 hours ago