## Trying to draw XY line with Line Chart but X values are being ignored

Let me begin by giving you an idea of what kind of chart I'm trying to make. This would be ideal:

Oz0GqUn.png

I've spent hours trying to solve this problem without any luck. I'm pretty sure that it's impossible to draw series like in the image above, where the X values are not always ascending. I can work around this by splitting the polygon in half and having two series for each side.

The main problem I'm having is that the chart just ignores my X values. For example, if I try to draw a line from (40, 1300) to (50, 1300), the line will begin at the edge and end on the other side, instead of drawing a line between X values of 40 and 50 with gaps at the side. I'm basically getting this:

kxABsRI.png

The chart is ignoring the X part of my data and it's only drawing the Y values in succession. If I put NaN values before and after my actual values, I get this:

bJrsCvi.png

Since I now have 4 values (2 empty and 2 actual), the X axis (bottom) is simply divided into 4 parts and the X values are completely ignored (the line should only be between 40 and 50).

So my question is how can I force the chart to draw the lines from actual XY values instead of automatically dividing the graph evenly by the number of values I have?

My code is as follows:
Code:
```        // Code for both axis:
chartYaxis = new NumericAxis<ChartData>();
chartYaxis.setPosition(Position.LEFT);
chartYaxis.setDisplayGrid(true);
chartYaxis.setMinimum(1000.0);
chartYaxis.setMaximum(1700.0);
chartYaxis.setInterval(100.0);

chartXaxis = new NumericAxis<ChartData>();
chartXaxis.setPosition(Position.BOTTOM);
chartXaxis.setDisplayGrid(true);
chartXaxis.setMinimum(30.0);
chartXaxis.setMaximum(65);
chartXaxis.setInterval(5.0);

// Code for data series:
LineSeries<ChartData> series1 = new LineSeries<ChartData>();
series1 .setYAxisPosition(Position.LEFT);
series1 .setYField(chartDataProps.yVal());
envelope1Series.setGapless(true);

// Code for creating chart:
wbChart = new Chart<ChartData>();
wbChart.setStore(chartStore);