Chart & Visualization Issues

How to Create Multi-Category Charts with Separate Legends

Bushra ParveenBushra Parveen Oct 29, 2026 870 views

Question details

The user wants to learn how to create a grouped multi-category chart and configure a separate legend for the data.

How to Create Multi-Category Charts with Separate Legends
Product
Excel PivotChart and Power BI
Device & OS
not provided
Scenario
Visualizing complex datasets where bars or data points need to be grouped by multiple categories while maintaining a distinct, separate legend to identify the series.
Observed behavior
To achieve the correct visual grouping, data fields must be properly assigned to the column variables (or X-axis wells) while the legend is configured independently.
Before you start

Ensure your dataset is clean, with clear column headers representing your categories and values, and verify that there are no blank rows or merged cells interrupting the data range.

Solution 1Recommended

Use PivotCharts to Create Multi-Category Groups

Creating a PivotChart is the most effective way to group multiple categories and display a separate legend for your data in spreadsheet applications.

PivotCharts automatically group categories when multiple fields are dragged into the Axis (Categories) area. The Legend (Series) area acts independently to create your separate legend.

1
Insert a PivotChart

Select your entire dataset, navigate to the 'Insert' tab on the ribbon, and click 'PivotChart'.

2
Choose Chart Location

Select where you want to place the PivotChart (such as a New Worksheet or Existing Worksheet) and click 'OK'.

3
Group the Categories

In the PivotChart Fields pane, drag your primary and secondary category fields into the 'Axis (Categories)' area. This will group the bars on the chart.

4
Configure the Separate Legend

Drag the specific field you want to use for color-coding or series identification into the 'Legend (Series)' area to create a distinct legend.

5
Add Values

Finally, drag your numerical data field into the 'Values' area to populate the chart's bars or columns.

Use PivotCharts to Create Multi-Category Groups
Tip: You can change the chart type to clustered columns or stacked bars at any time by right-clicking the chart and selecting 'Change Chart Type'.
Easily Visualize Complex Data

Create Multi-Category PivotCharts in WPS Spreadsheet

WPS Spreadsheet offers robust PivotTable and PivotChart features that make grouping multiple data categories and customizing legends incredibly simple. It supports all standard Excel chart formats, allowing you to visualize your data professionally with intuitive drag-and-drop mechanics.

  1. 1. Open your data file: Launch WPS Spreadsheet and open the document containing your dataset.
  2. 2. Insert PivotTable: Go to the 'Insert' tab and click 'PivotTable' to generate a data summary.
  3. 3. Generate PivotChart: Once the PivotTable is created, select any cell inside it, go to the 'PivotTable Tools' tab, and click 'PivotChart'.
  4. 4. Group Fields: Drag multiple fields into the 'Axis' box for category grouping, and place your differentiating field into the 'Legend' box.
  5. 5. Customize Appearance: Use the 'Chart Tools' tab to refine your legend's position and the overall aesthetic of your multi-category chart.
Fully compatible with Microsoft Excel (.xlsx) files and standard PivotChart formats.Intuitive drag-and-drop field list for easy multi-category grouping.Lightweight application that handles large datasets smoothly and without lag.Rich customization options for chart legends, titles, and data labels.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my PivotChart legend showing the same fields as my axis categories?

This happens if you place the same data field in both the Axis (Categories) area and the Legend (Series) area. Ensure you drag the specific field meant for the legend out of the Axis area and strictly place it into the Legend area.

Can I create a multi-level category chart without using a PivotChart?

Yes, standard 2D Column charts can display multi-level category labels. To do this, your source data must be organized hierarchically, with the outer category column containing the primary label only once, leaving blank cells below it for the grouped sub-items.

How do I change the position of the separate legend on my chart?

Click on the chart to activate the Chart Elements menu (often indicated by a plus icon next to the chart). Hover over 'Legend', click the arrow next to it, and select your preferred position, such as Top, Bottom, Left, or Right.

Will my Excel multi-category PivotChart work perfectly in WPS Spreadsheet?

Yes, WPS Spreadsheet is fully compatible with Microsoft Excel PivotCharts. You can open, edit, and refresh your grouped charts with separate legends exactly as you would in Excel without losing any formatting.