use of com.codename1.charts.models.XYMultipleSeriesDataset in project CodenameOne by codenameone.
the class XYMultiSeriesTransition method getBuffer.
/**
* Gets the buffer/cache for values. Values set in the buffer will be applied
* to the target dataset when the transition takes place.
* @return
*/
public XYMultipleSeriesDataset getBuffer() {
if (datasetCache == null) {
datasetCache = new XYMultipleSeriesDataset();
for (int i = 0; i < dataset.getSeriesCount(); i++) {
datasetCache.addSeries(new XYSeries(dataset.getSeriesAt(i).getTitle()));
}
seriesTransitions = new XYSeriesTransition[dataset.getSeries().length];
int tlen = seriesTransitions.length;
for (int i = 0; i < tlen; i++) {
seriesTransitions[i] = new XYSeriesTransition(getChart(), dataset.getSeriesAt(i));
seriesTransitions[i].setBuffer(datasetCache.getSeriesAt(i));
}
}
return datasetCache;
}
Aggregations