Similar to MPAndroidChart - First and last bars not rendering correctly, the first and last bubble in my chart isn't rendered fully, and is sliced in half as seen in the image.
The following is the current implementation for the BubbleChart.
private void initializeBubbleChart() {
mChart = (BubbleChart) findViewById(R.id.bubblechart);
mChart .setDescription("");
mChart .setOnChartValueSelectedListener(this);
mChart .setDrawGridBackground(false);
mChart .setTouchEnabled(true);
mChart .setDragEnabled(true);
mChart .setScaleEnabled(true);
AxisValueFormatter xAxisFormatter = new DayAxisValueFormatter(mChart);
XAxis xAxis = mChart .getXAxis();
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
xAxis.setTypeface(typeFace);
xAxis.setDrawGridLines(false);
xAxis.setGranularity(1f); // only intervals of 1 day
xAxis.setValueFormatter(xAxisFormatter);
AxisValueFormatter yAxis = new YAxisValueFormatter("duration");
YAxis leftAxis = mChart .getAxisLeft();
leftAxis.setTypeface(typeFace);
leftAxis.setSpaceTop(30f);
leftAxis.setSpaceBottom(30f);
leftAxis.setDrawGridLines(false);
leftAxis.setValueFormatter(yAxis);
leftAxis.setDrawZeroLine(false);
YAxis rightAxis = mChart .getAxisRight();
rightAxis.setTypeface(typeFace);
rightAxis.setSpaceTop(30f);
rightAxis.setSpaceBottom(30f);
rightAxis.setDrawGridLines(false);
rightAxis.setValueFormatter(yAxis);
rightAxis.setDrawZeroLine(false);
populateData();
}
@Philipp Jahoda