SHARE
TWEET

BarChartExample

a guest Apr 3rd, 2013 24 Never
  1. private void drawLetterGraph() {
  2.                 BarChartView chartview = (BarChartView) getActivity().findViewById(R.id.chart_view);
  3.                 BarSeries series = new BarSeries();
  4.                 for (char c='a'; c <= 'z'; c++) {
  5.                         series.addPoint(new BarSeries.LinearPoint
  6.                                         (c-'a',letterFrequencies.get(String.valueOf(c))));
  7.                 }
  8.                 series.setLineColor(0xFF0099CC);
  9.                 series.setLineWidth(4);
  10.                 chartview.addSeries(series);
  11. }
RAW Paste Data
Top