Chart & Visualization Issues

How to Create an Excel Chart Legend for Numeric Categories

Elise WilliamsElise Williams Oct 16, 2026 871 views

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.

How to Create an Excel Chart Legend for Numeric Categories
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.
Before you start

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.

Solution 1Recommended

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.

1
Filter your data by category

Apply a filter to your data and select the first numeric category (e.g., Diagnosis = 1). Copy this filtered data.

2
Paste into a new column

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.

3
Rename the column headings

Replace the numeric headers of these new columns with the descriptive names you want to appear in the legend (e.g., 'Depression', 'Anxiety', 'PTSD').

4
Create the chart

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.

Restructure Data and Create Separate Series for Each Category
Legend Automatically Updated: Because each diagnosis now has its own series with a custom text header, the legend will perfectly match your descriptive categories.
Visualize Data Easily in WPS Spreadsheet

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. 1. Open your data file: Launch WPS Spreadsheet and open the dataset containing your numeric categories.
  2. 2. Separate the categories: Use the 'AutoFilter' tool under the Data tab to isolate and copy your numeric categories into different columns.
  3. 3. Rename headers: Change the top cells of your new columns to descriptive text like 'Depression' or 'Anxiety'.
  4. 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.
Fully compatible with Microsoft Excel (.xlsx) formatsIntuitive filtering and data restructuring toolsAdvanced chart types including Scatter and Bubble chartsFree, lightweight, and easy to master
microsoft office alternative - wps office

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.