Line chart legends issue for single series

Occasional Contributor

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 

ThilakBabu_0-1659032397005.png

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.

 

PeriodsCategoryxyz
Week1Test119830648.96
Week2Test123725962.18
Week3Test121654365.27
Week4Test115871275.72
Week5Test118692146.55
Week6Test123821205.11
Week7Test111731178.64
Week8Test122901637.91
Week9Test116757884.33
Week10Test127667286.52
Week11Test125845377.80
Week12Test128271005.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

9 Replies

@ThilakBabu 

Click anywhere in the chart.

On the Chart Design tab of the ribbon, click Select Data.

The dialog should look like this:

S1609.png

If you click Edit under Legend Entries (Series), it should look similar to this:

S1607.png

And if you click Edit under Horizontal (Category) Axis Labels:

S1608.png

You should then get:

S1610.png

Hi @Hans Vogelaar 

 

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 :

ThilakBabu_0-1659038386502.png

 

Category axis labels :

ThilakBabu_2-1659038662567.png

So, could you please help me further! Thanks in advance!

 

Thanks,

Thilak Babu

 

@ThilakBabu 

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.

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

@ThilakBabu 

Yes, please attach or share the workbook.

@Hans Vogelaar 

 

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

@ThilakBabu 

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.

Hi @Hans Vogelaar 

 

Thanks for guiding me. I have sent a private msg to you with the attachment.

 

Thanks,

Thilak Babu

@ThilakBabu 

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.