Jul 28 2022 11:28 AM - edited Jul 28 2022 11:29 AM
Hi Team,
I am facing an issue in a line chart with single legend series and multiple category axis labels. The legend shows the category axis labels (which are multiple) instead of the series name (which is just a single).
This is the chart screenshot
Here, basically I'm expecting legend to show just one legend series name which is Test.
Instead it shows 12 legends which is category axis labels.
Pls find the data below which I'm using to generate the excel.
Periods | Category | xyz |
Week1 | Test | 119830648.96 |
Week2 | Test | 123725962.18 |
Week3 | Test | 121654365.27 |
Week4 | Test | 115871275.72 |
Week5 | Test | 118692146.55 |
Week6 | Test | 123821205.11 |
Week7 | Test | 111731178.64 |
Week8 | Test | 122901637.91 |
Week9 | Test | 116757884.33 |
Week10 | Test | 127667286.52 |
Week11 | Test | 125845377.80 |
Week12 | Test | 128271005.73 |
Please help me to get the legend with single series instead of the 12 labels. Ima tyring to attach excel, but unable to. Let me know how can I attach the excel sheet.
Thanks,
Thilak Babu
Jul 28 2022 12:48 PM
Click anywhere in the chart.
On the Chart Design tab of the ribbon, click Select Data.
The dialog should look like this:
If you click Edit under Legend Entries (Series), it should look similar to this:
And if you click Edit under Horizontal (Category) Axis Labels:
You should then get:
Jul 28 2022 01:04 PM - edited Jul 28 2022 01:05 PM
I did the same whatever you have mentioned.
Still I'm seeing the legends as Week1 Test to Week12 Test instead of Test
Legend entry series :
Category axis labels :
So, could you please help me further! Thanks in advance!
Thanks,
Thilak Babu
Jul 28 2022 01:19 PM
Try creating the chart again from scratch:
- Select the source range as shown in your first post.
- Insert a line chart.
If I do that, I get the correct chart. The only things that need to be changed are the minimum, maximum and major unit of the y-axis.
Jul 28 2022 01:42 PM
Hi @Hans Vogelaar ,
We created the excel programmatically.
The use case is to show only one legend. So trying to understand how I can change the same excel to achieve it . Please let me know if I can share the excel in case you need to take a look.
Thanks,
Thilak Babu
Jul 28 2022 02:02 PM
Yes, please attach or share the workbook.
Jul 28 2022 02:07 PM
I could not find an option to attach the excel. I am seeing an option only to attach an image. Could you please guide me to attach the excel ?
Thanks,
Thilak Babu
Jul 28 2022 02:24 PM
If you cannot attach a workbook, you can upload it to for example OneDrive, Google Drive or Dropbox, then get a link to the uploaded file and post that in a reply.
Or you can send me a private message; you should be able to attach a file there.
Jul 28 2022 02:36 PM
Thanks for guiding me. I have sent a private msg to you with the attachment.
Thanks,
Thilak Babu
Jul 28 2022 03:11 PM
That's very weird. I have no idea why the chart behaves like that. I have created a new line chart based on the data, and the legend behaves as expected. See the attached workbook.