use of org.eclipse.tracecompass.internal.tmf.chart.core.consumer.IDataConsumer in project tracecompass by tracecompass.
the class SwtXYChartViewer method createChartConsumer.
/**
* Create the main consumer for the chart. For each series, it create the
* series consumer. It also needs the X and Y aggregators.
*/
private final XYChartConsumer createChartConsumer() {
List<XYSeriesConsumer> series = new ArrayList<>();
getData().getChartSeries().forEach(s -> {
IDataConsumer xConsumer = getXConsumer(s);
IDataConsumer yConsumer = getYConsumer(s);
/* Create consumer for this series */
series.add(new XYSeriesConsumer(s, xConsumer, yConsumer));
});
/* Get the aggregators */
IConsumerAggregator xAggregator = getXAggregator();
IConsumerAggregator yAggregator = getYAggregator();
/* Create the chart consumer */
return new XYChartConsumer(series, xAggregator, yAggregator);
}
Aggregations