LineChart question for skipping Y values in LineSeries
I am pretty new to GXT and the forum, so I am hoping I am posting at the right place. So I have a bit of a question.
Right now, I am going through the chart examples (http://www.sencha.com/examples/#ExamplePlace:linechart) and I have a question. I have noticed that for each series that is generated, it is assumed that for each X value there is a Y value present. I looked at the getData() method and it looks like your standard stuff of randomizing values for the demo. For example, for the Line Chart, each month in data1, data2, and data3 has a Y plot -fine.
However, for example, what if the value of Y is not known for the month of May for data1? Right now, in the working example one has to put value of type Double in the Data class (in this case, I just put 0 since I don't know the value), but of course the line would dip down to 0. I can't pull NULL or any of that either since the data class is expecting an object of type Double.
My question is, is there a way to "skip" that month and let the line plot from April to June smoothly instead of inserting a random number (like '0') and making the graph incorrect?
Thanks, any help would be appreciated!
If LineSeries encounters a Number that is of value null or Double.NaN it will not render a point for that data point. Additionally if you want a visible gap in the line to appear at that point you can use setGapless(false);
Rendering random values for null values in LineSeries
Plotting year vs price where price is BigDecimal (y-axis), Suppose for year 2007 Price1 is null and Price2 in not null.
It is plotting random values for Price1 as well.
series.setGapless(false) didn't help.