This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

BarChartExample

By: a guest on Apr 3rd, 2013  |  syntax: Java  |  size: 0.39 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data