private void drawLabel(Canvas canvas, BubbleValue bubbleValue, float rawX, float rawY) {
        final Rect contentRect = computator.getContentRectMinusAllMargins();
        final int numChars = valueFormatter.formatChartValue(labelBuffer, bubbleValue);

        if (numChars == 0) {
            // No need to draw empty label
            return;
        }

        final float labelWidth = labelPaint.measureText(labelBuffer, labelBuffer.length - numChars, numChars);
        final int labelHeight = Math.abs(fontMetrics.ascent);
        float left = rawX - labelWidth / 2 - labelMargin;
        float right = rawX + labelWidth / 2 + labelMargin;
        float top = rawY - labelHeight / 2 - labelMargin;
        float bottom = rawY + labelHeight / 2 + labelMargin;

        if (top < contentRect.top) {
            top = rawY;
            bottom = rawY + labelHeight + labelMargin * 2;
        }
        if (bottom > contentRect.bottom) {
            top = rawY - labelHeight - labelMargin * 2;
            bottom = rawY;
        }
        if (left < contentRect.left) {
            left = rawX;
            right = rawX + labelWidth + labelMargin * 2;
        }
        if (right > contentRect.right) {
            left = rawX - labelWidth - labelMargin * 2;
            right = rawX;
        }

        labelBackgroundRect.set(left, top, right, bottom);
        drawLabelTextAndBackground(canvas, labelBuffer, labelBuffer.length - numChars, numChars,
                bubbleValue.getDarkenColor());

    }
Calculate bubble radius and center x and y coordinates. Center x and x will be stored in point parameter, radius
will be returned as float value.
hellocharts-library/src/lecho/lib/hellocharts/renderer/BubbleChartRenderer.java