The Bubble 3D Chart Type
The Bubble 3D Chart can be created using the ScatterRenderableSeries3D type. It is exactly the same Chart Type that Scatter Chart 3D is except it has individually colored points via the MetadataProvider API.
Note
Please see the Scatter Chart 3D article for more information about ScatterRenderableSeries3D.
Note
Examples for the Bubble Series 3D can be found in the SciChart Android Examples Suite as well as on GitHub:
There is a special class PointMetadataProvider3D which stores collection of PointMetadataProvider3D.PointMetadata3D. Is expects to have metadata for each point in your IDataSeries3D<TX,TY,TZ>.
The PointMetadataProvider3D.PointMetadata3D allows you to change the Color as well as Scale of your vertexes in point-by-point basis.
Please see the code below to see how to use PointMetadataProvider3D to provide metadata for the ScatterRenderableSeries3D:
final XyzDataSeries3D<Double, Double, Double> dataSeries = new XyzDataSeries3D<>(Double.class, Double.class, Double.class);
final PointMetadataProvider3D pointMetaDataProvider = new PointMetadataProvider3D();
for (int i = 0; i < 250; i++) {
final double x = dataManager.getGaussianRandomNumber(5, 1.5);
final double y = dataManager.getGaussianRandomNumber(5, 1.5);
final double z = dataManager.getGaussianRandomNumber(5, 1.5);
dataSeries.append(x, y, z);
// Provide metadata for each point in DataSeries
final PointMetadataProvider3D.PointMetadata3D metadata = new PointMetadataProvider3D.PointMetadata3D(dataManager.getRandomColor(), dataManager.getRandomScale());
pointMetaDataProvider.metadata.add(metadata);
}
// Apply the MetadataProvider onto the Scatter Series 3D
final ScatterRenderableSeries3D rs = new ScatterRenderableSeries3D();
rs.setMetadataProvider(pointMetaDataProvider);