public static String[] generateXLabels(Index[] data, DataRange range) {
        String labels[] = new String[data.length];
        for (int i = 0; i < data.length; i++) {
//            cal.add(Calendar.DATE, +1);
//            labels[i] = formatter.format(cal.getTime());
            switch(range) {
                case ONEDAY:
                    labels[i] = data[i].getDay() + " " + data[i].getHour();
                    break;
                default:
                    labels[i] = data[i].getDay();
                    break;
            }
        }
        return labels;
    }