Search in sources :

Example 1 with HorizontalBarBuffer

use of com.github.mikephil.charting.buffer.HorizontalBarBuffer in project MPAndroidChart by PhilJay.

the class HorizontalBarChartRenderer method initBuffers.

@Override
public void initBuffers() {
    BarData barData = mChart.getBarData();
    mBarBuffers = new HorizontalBarBuffer[barData.getDataSetCount()];
    for (int i = 0; i < mBarBuffers.length; i++) {
        IBarDataSet set = barData.getDataSetByIndex(i);
        mBarBuffers[i] = new HorizontalBarBuffer(set.getEntryCount() * 4 * (set.isStacked() ? set.getStackSize() : 1), barData.getDataSetCount(), set.isStacked());
    }
}
Also used : HorizontalBarBuffer(com.github.mikephil.charting.buffer.HorizontalBarBuffer) BarData(com.github.mikephil.charting.data.BarData) IBarDataSet(com.github.mikephil.charting.interfaces.datasets.IBarDataSet)

Aggregations

HorizontalBarBuffer (com.github.mikephil.charting.buffer.HorizontalBarBuffer)1 BarData (com.github.mikephil.charting.data.BarData)1 IBarDataSet (com.github.mikephil.charting.interfaces.datasets.IBarDataSet)1