package com.cpm.lorealbaMabeline.utils;

import com.github.mikephil.charting.data.BarEntry;
import com.github.mikephil.charting.formatter.ValueFormatter;

public class VerticalValueFormatter extends ValueFormatter {
    @Override
    public String getBarLabel(BarEntry barEntry) {
        String value = String.valueOf((int) barEntry.getY());
        StringBuilder verticalText = new StringBuilder();

        for (char c : value.toCharArray()) {
            verticalText.append(c).append("\n");
        }

        return verticalText.toString().trim(); // Trim to remove the last newline
    }
}