<a class='bbc_url' href='
http://wiki.eclipse.org/BIRT/FAQ/Charts2.2#How_do_I_display_series_with_different_number_of_samples_on_the_same_chart.3F'>http://wiki.eclipse.org/BIRT/FAQ/Charts2.2#How_do_I_display_series_with_different_number_of_samples_on_the_same_chart.3F</a><br />
<br />
I have learned from the above url that we can set a null value for Y, if two series of a combination chart has different number of (X,Y) pairs. The following is my Java code, where getYCoordinates() returns an array of double (which is the set of Y values for Series1) and ySecondCoordinates is the set of Y values for Series2. So how can I set null here? The Y values should be either int, float or double. I don't get the idea specified in the above url completely. Could you please explain in detail, based on the following code?<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>NumberDataSet DataSet1 = NumberDataSetImpl.create(getYCoordinates());
LineSeries ls1 = (LineSeries) LineSeriesImpl.create();
ls1.setDataSet(DataSet1);
ls1.getLineAttributes().setColor(this.chartColor);
ls1.getMarkers().get(0).setType(MarkerType.ICON_LITERAL);
ls1.setSeriesIdentifier(strFirstSeriesID);
SeriesDefinition sdY1 = SeriesDefinitionImpl.create();
yAxis.getSeriesDefinitions().add(sdY1);
sdY1.getSeries().add(ls1);
if (secondGraphCoordinates != null) {
int size = secondGraphCoordinates.size();
double[] ySecondCoordinates = new double[size];
for (int i = 0; i < size; i++) {
Point point = secondGraphCoordinates.get(i);
ySecondCoordinates[i] = point.y;
}
NumberDataSet DataSet2 = NumberDataSetImpl
.create(ySecondCoordinates);
LineSeries ls2 = (LineSeries) LineSeriesImpl.create();
ls2.setDataSet(DataSet2);
ls2.getLineAttributes().setColor(ColorDefinitionImpl.ORANGE());
ls2.getMarkers().get(0).setType(MarkerType.ICON_LITERAL);
ls2.setSeriesIdentifier(strSecondSeriesID);
SeriesDefinition sdY2 = SeriesDefinitionImpl.create();
yAxis.getSeriesDefinitions().add(sdY2);
sdY2.getSeries().add(ls2);
}
</pre>