Line Chart Problem

r1998

Board Regular
Joined
Sep 9, 2018
Messages
106
Dear Friends and Respected Seniors,
I have the Y coordinates for a simple line chart from A1 to A8, I select A1-A8 and create a line chart (X coordinates are generated automatically from 1-8)
Data in A1 to A8 is
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
The problem I am facing is, for the last two Y coordinates the X value is same, so it must make a vertical line in chart. I tried to assign X coordinates manually by filling values in B1-B8 as
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[/TR]
</tbody>[/TABLE]

and then assigning by clicking on chart>selectdata>horizontal axis lables and selecting from b1-b8.... but it still didnt work :confused:
the chart that i have now is
https://paste.pics/4XCRB

the chart that i want
https://paste.pics/4XCRQ

Can anyone please kindly guide and help me
Awaiting your replies.
Thank you.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
First, put your X values in the first column and your Y values in the second column (and subsequent columns if there are more sets of Y values). Put a label above each column of Y values, and leave the cell above the X values blank. When you make a chart from a range like this, the blank cell helps Excel figure out what to plot as X and Y, and it will use the labels above the Y values as series names, which will then appear in the legend.

Second, you don't want a LINE chart, you want an XY SCATTER chart. A line chart treats the X values as text labels, not as numerical positions.

q75MSDM.png
 
Upvote 0
Thank you so much Jon Peltier Sir, I googled and searched for almost 3 hrs, got fed up, then finally posted this question here.
i did exactly as u said, now X coordinates are in Column A, Y coordinates in column B, and then created the XY scatter chart. Everything worked perfectly. :biggrin:
Thank you. :beerchug:
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top