SciChart Android 2D Charts API > 2D Chart Types > The Bubble Series Type
The Bubble Series Type

Bubble Chart are provided by the FastBubbleRenderableSeries class. It accepts data from a XyzDataSeries (X,Y, Z - bubble scale ) and renders a bubble at each XY value.

Examples for the Bubble Series can be found in the SciChart Android Examples Suite

Create a Bubble Chart

To create a Bubble Chart you can use next code:

// Declare axes
final IAxis xAxis = sciChartBuilder.newDateAxis().withGrowBy(0d, 0.1d).build();
final IAxis yAxis = sciChartBuilder.newNumericAxis().withGrowBy(0d, 0.1d).build();

// Declare DataSeries and append some data
final XyzDataSeries<Date, Double, Double> dataSeries = sciChartBuilder.newXyzDataSeries(Date.class, Double.class, Double.class).build();
final List<TradeData> tradeTicks = DataManager.getInstance().getTradeTicks(getActivity());
        for (int i = 0; i < tradeTicks.size(); i++) {
     TradeData tradeData = tradeTicks.get(i);
     dataSeries.append(tradeData.getTradeDate(), tradeData.getTradePrice(), tradeData.getTradeSize());
}
// Declare RenderableSeries
final FastLineRenderableSeries lineSeries = sciChartBuilder.newLineSeries().withDataSeries(dataSeries).withStrokeStyle(0xffff3333, 2f).build();
final FastBubbleRenderableSeries bubbleSeries = sciChartBuilder.newBubbleSeries()
         .withDataSeries(dataSeries)
         .withZScaleFactor(zScaleFactor / 10f)
         .withBubbleBrushStyle(new SolidBrushStyle(0x77CCCCCC))
         .withStrokeStyle(0xFFCCCCCC, 2f, true)
         .withAutoZRange(false)
         .build();

// Init chart
UpdateSuspender.using(surface, new Runnable() {
     @Override
     public void run() {
         Collections.addAll(surface.getXAxes(), xAxis);
         Collections.addAll(surface.getYAxes(), yAxis);
         Collections.addAll(surface.getRenderableSeries(), lineSeries, bubbleSeries);
     }
});