Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class BubbleChart
- Object
- AbstractChart
- XYChart
- BubbleChart
Displays series of XYValueSeries entries as proportional bubbles on
top of an XYChart plot.
Combine the chart with an XYMultipleSeriesDataset that contains one
or more XYValueSeries instances and supply an
XYMultipleSeriesRenderer. The resulting BubbleChart can be
wrapped in a com.codename1.charts.ChartComponent to embed it inside a
Codename One UI.
Fields
public static final String TYPE = "Bubble" | The constant to identify this chart type. |
Constructors
public BubbleChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer) | Builds a new bubble chart instance. |
Methods
Inherited fields
Inherited methods
From XYChart
setDatasetRenderer, draw, getXLabels, getYLabels, getScreenR, setScreenR, drawSeries, drawPoints, drawChartValuesText, drawText, drawXLabels, drawYLabels, drawXTextLabels, getRenderer, getDataset, getCalcRange, setCalcRange, toRealPoint, toScreenPoint, toRealPoint, toScreenPoint, getSeriesAndPointForScreenCoordinate, isRenderNullValues, isRenderPoints, getDefaultMinimum, getPointsChart
Field details
TYPE
public static final String TYPE = "Bubble"Constructor details
BubbleChart
public BubbleChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)Parameters
datasetXYMultipleSeriesDataset- the multiple series dataset
rendererXYMultipleSeriesRenderer- the multiple series renderer
Method details
drawSeries
public void drawSeries(Canvas canvas, Paint paint, List<Float> points, XYSeriesRenderer renderer, float yAxisValue, int seriesIndex, int startIndex)Parameters
canvasCanvas- the canvas to paint to
paintPaint- the paint to be used for drawing
pointsList<Float>- the array of points to be used for drawing the series
rendererXYSeriesRenderer- the series renderer
yAxisValuefloat- the minimum value of the y-axis
seriesIndexint- the index of the series currently being drawn
startIndexint- the start index of the rendering points
clickableAreasForPoints
protected ClickableArea[] clickableAreasForPoints(List<Float> points, List<Double> values, float yAxisValue, int seriesIndex, int startIndex)Parameters
pointsList<Float>- the array of points
valuesList<Double>- the array of values of each point
yAxisValuefloat- the minimum value of the y axis
seriesIndexint- the index of the series to which the points belong
startIndexint- the start index of the rendering points
Returns
getLegendShapeWidth
public int getLegendShapeWidth(int seriesIndex)Parameters
seriesIndexint- the series index
Returns
drawLegendShape
public void drawLegendShape(Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, Paint paint)Parameters
canvasCanvas- the canvas to paint to
rendererSimpleSeriesRenderer- the series renderer
xfloat- the x value of the point the shape should be drawn at
yfloat- the y value of the point the shape should be drawn at
seriesIndexint- the series index
paintPaint- the paint to be used for drawing
getChartType
public String getChartType()