# Single chart with two lines with different categories

I have some data like this:

```
X1 | Y1
----------
1 | 100
2 | 120
3 | 130
5 | 160
X2 | Y2
----------
1 | 80
3 | 110
4 | 140
5 | 155
```

Basically the values (Y) are associated with a corresponding X value. The X values are not continuous and have some “holes”.

I need to put both on a single line chart, but, if I use the X1 values as categories, then the Y1 plot is correct, but the Y2 isn't as the second value of Y2 (110) would end shown for X value 2, but its correct X value is 3.

I cannot change the format of the table, nor join the tables, unless I can do that automatically in a hidden sheet. The data needs to stay as it is.

To give more details on where I get the data from (in response to an answer I got), the data sets actually contain three different columns. A date, a number of days from that date (X), and the value (Y).

The X column is calculated with `=DAYS(ValueFromTheDateColumn, DATE(InitialYear, InitialMonth, InitialDay))`

.

The initial date is different from the two data sets, so I cannot merge the two data sets into one as it would not make sense.

What kind of chart?

Lupp: a line chart, with points and lines style.

(Sorry if I sound dogmatic.)

A 'Line'-chart not being an 'X-Y (Scatter)' chart is a bad thing in itself. Just

consider what the line should stand for. Anybody with at least a basic technical education should suppose the line to tell something like " there is a development in time" or "...regarding an abscissa-variable scaled in one of the usual ways". 'Labels' aren't. Use 'Column' charts in cases where there is no scaled "development" and where slopes don't mean anything therefore.The Y value is a weight, so there's a development over time.

Quoting @mbf82: "The Y value is a weight, so there's a development over time."

If so you should use X-Y charting anyway. The only thing needed is that what you called 'Label' also is numeric: the dates presumably.

All the other problems will simply vanish.

See coming amendment to my answer.