How to Create an Excel Chart Legend for Numeric Categories
Question details
The user needs to display descriptive text in a chart legend for data that uses numeric codes and handle duplicate data points that overlap.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a chart with descriptive legends from a dataset containing numeric category codes and overlapping coordinate points.
- Observed behavior
- Excel displays numeric codes instead of descriptive text in the legend, and overlapping identical data points are hidden in standard charts.
Ensure your dataset is cleaned and organized. Consider sorting your data by the numeric category column first to make filtering and separating the values easier.
Restructure Data and Create Separate Series for Each Category
Filter your data by numeric code, separate them into distinct columns, and assign descriptive names to each series to properly populate the legend.
By default, Excel charts cannot automatically translate a single column of numeric codes into multiple distinct legend entries. You must reorganize the data into separate columns for each category so that each column acts as an independent chart series.
Apply a filter to your data and select the first numeric category (e.g., Diagnosis = 1). Copy this filtered data.
Paste the copied data into a new, empty column. Repeat this filtering and copying process for the remaining numeric categories (e.g., 2 and 3) into separate adjacent columns.
Replace the numeric headers of these new columns with the descriptive names you want to appear in the legend (e.g., 'Depression', 'Anxiety', 'PTSD').
Select the newly structured columns, navigate to the Insert tab, and choose your desired chart type. The chart legend will now automatically use your descriptive headings.

Use a Bubble Chart to Represent Duplicate Data Points
When multiple records share the same X and Y values, use a bubble chart with a count column to visualize data density and prevent overlapping points from being hidden.
Easily Manage Chart Legends and Bubble Charts in WPS Spreadsheet
WPS Spreadsheet provides powerful data filtering, restructuring, and advanced charting tools to help you visualize complex categorical data effortlessly. It offers a seamless experience for managing series names and creating Bubble Charts, all while maintaining perfect compatibility with Microsoft Excel formats.
- 1. Open your data file: Launch WPS Spreadsheet and open the dataset containing your numeric categories.
- 2. Separate the categories: Use the 'AutoFilter' tool under the Data tab to isolate and copy your numeric categories into different columns.
- 3. Rename headers: Change the top cells of your new columns to descriptive text like 'Depression' or 'Anxiety'.
- 4. Insert your chart: Highlight the newly formatted ranges, navigate to the Insert tab, and select your preferred chart type. The legend will populate automatically.

Frequently Asked Questions
Why does my Excel chart legend show numbers instead of names?
If your source data uses numeric codes for categories and is plotted as a single series, Excel will default to those numbers or generic 'Series 1, Series 2' labels. You must restructure the data into separate columns with text headers or manually edit the series names in the 'Select Data Source' dialog.
How can I show duplicate overlapping points on an Excel chart?
Standard scatter or line charts hide identical overlapping points. To visualize them, add a 'Count' or frequency column to calculate the occurrences of each coordinate, and use a Bubble Chart where the bubble size represents the count.
How do I edit the legend text without changing my source data?
Right-click the chart, choose 'Select Data', click on a series, and select 'Edit'. In the 'Series name' box, manually type the descriptive name enclosed in quotation marks (e.g., "Depression") instead of linking it to a cell reference.




