@Override public void notifyDataSetChanged() { if (mData == null) return; calcMinMax(); if (mLegend != null) mLegendRenderer.computeLegend(mData); calculateOffsets(); }
@Override public void calculateOffsets() { super.calculateOffsets(); // prevent nullpointer when no data set if (mData == null) return; float diameter = getDiameter(); float radius = diameter / 2f; MPPointF c = getCenterOffsets(); float shift = mData.getDataSet().getSelectionShift(); // create the circle box that will contain the pie-chart (the bounds of // the pie-chart) mCircleBox.set(c.x - radius + shift, c.y - radius + shift, c.x + radius - shift, c.y + radius - shift); MPPointF.recycleInstance(c); }
@Override public void notifyDataSetChanged() { if (mData == null) return; calcMinMax(); if (mLegend != null) mLegendRenderer.computeLegend(mData); calculateOffsets(); }
@Override public void notifyDataSetChanged() { if (mData == null) { return; } calcMinMax(); if (mLegend != null) { mLegendRenderer.computeLegend(mData); } calculateOffsets(); }
@Override public void notifyDataSetChanged() { if (mData == null) return; calcMinMax(); if (mLegend != null) mLegendRenderer.computeLegend(mData); calculateOffsets(); }
@Override public void notifyDataSetChanged() { if (mData == null) return; calcMinMax(); if (mLegend != null) mLegendRenderer.computeLegend(mData); calculateOffsets(); }
@Override public void calculateOffsets() { super.calculateOffsets(); // prevent nullpointer when no data set if (mData == null) return; float diameter = getDiameter(); float radius = diameter / 2f; MPPointF c = getCenterOffsets(); float shift = mData.getDataSet().getSelectionShift(); // create the circle box that will contain the pie-chart (the bounds of // the pie-chart) mCircleBox.set(c.x - radius + shift, c.y - radius + shift, c.x + radius - shift, c.y + radius - shift); MPPointF.recycleInstance(c); }
@Override public void calculateOffsets() { super.calculateOffsets(); // prevent nullpointer when no data set if (mData == null) { return; } float diameter = getDiameter(); float radius = diameter / 2f; MPPointF c = getCenterOffsets(); float shift = mData.getDataSet().getSelectionShift(); // create the circle box that will contain the pie-chart (the bounds of // the pie-chart) mCircleBox.set(c.x - radius + shift, c.y - radius + shift, c.x + radius - shift, c.y + radius - shift); MPPointF.recycleInstance(c); }
@Override public void calculateOffsets() { super.calculateOffsets(); // prevent nullpointer when no data set if (mData == null) return; float diameter = getDiameter(); float radius = diameter / 2f; MPPointF c = getCenterOffsets(); float shift = mData.getDataSet().getSelectionShift(); // create the circle box that will contain the pie-chart (the bounds of // the pie-chart) mCircleBox.set(c.x - radius + shift, c.y - radius + shift, c.x + radius - shift, c.y + radius - shift); MPPointF.recycleInstance(c); }
@Override public void calculateOffsets() { super.calculateOffsets(); // prevent nullpointer when no data set if (mData == null) return; float diameter = getDiameter(); float radius = diameter / 2f; MPPointF c = getCenterOffsets(); float shift = mData.getDataSet().getSelectionShift(); // create the circle box that will contain the pie-chart (the bounds of // the pie-chart) mCircleBox.set(c.x - radius + shift, c.y - radius + shift, c.x + radius - shift, c.y + radius - shift); MPPointF.recycleInstance(c); }