public void loadNumStacks() { List<Column> cols = new ArrayList<>(); for (MatchData m : team.getMatchData()) { List<SubcolumnValue> subCols = new ArrayList<>(); SubcolumnValue auton = new SubcolumnValue(m.autonYellowTotes).setLabel("m" + m.matchNo); auton.setColor(getResources().getColor(R.color.accent)); subCols.add(auton); cols.add(new Column(subCols).setHasLabels(true)); } ColumnChartData data = new ColumnChartData(cols).setBaseValue(0).setStacked(true); data.setAxisYLeft(new Axis().setHasLines(true).setName("Yellow totes stacked")); data.setAxisXBottom(new Axis().setName("Match")); autonTotes.setColumnChartData(data); }
@Override public void onValueSelected(int columnIndex, int subcolumnIndex, SubcolumnValue value) { generateLineData(value.getColor(), 100); }