private View createPieChart() {
   String[] code = new String[] {"eclair", "froyo"};
   double[] distribution = {20.0, 40.0};
   int[] color = {Color.WHITE, getResources().getColor(R.color.button_signup_color)};
   CategorySeries distributionSeries = new CategorySeries("Top Blocked Number");
   for (int i = 0; i < distribution.length; i++) {
     distributionSeries.add(code[i], distribution[i]);
   }
   DefaultRenderer defaultRenderer = new DefaultRenderer();
   for (int i = 0; i < distribution.length; i++) {
     SimpleSeriesRenderer seriesRenderer = new SimpleSeriesRenderer();
     seriesRenderer.setColor(color[i]);
     seriesRenderer.setShowLegendItem(false);
     defaultRenderer.addSeriesRenderer(seriesRenderer);
   }
   defaultRenderer.setDisplayValues(false);
   defaultRenderer.setShowLabels(false);
   defaultRenderer.setPanEnabled(false);
   defaultRenderer.setZoomEnabled(false);
   /*defaultRenderer.setChartTitle("Top Blocked Number");
   defaultRenderer.setChartTitleTextSize(20F);
   defaultRenderer.setDisplayValues(true);
   */
   return ChartFactory.getPieChartView(
       getActivity().getApplicationContext(), distributionSeries, defaultRenderer);
 }
    private void drawChart() {
      DefaultRenderer render = new DefaultRenderer();

      CategorySeries incomeSeries = getDataSet();

      for (int i = 0; i < incomeSeries.getItemCount(); i++) {
        SimpleSeriesRenderer incomeSeriesRenderer = new SimpleSeriesRenderer();
        incomeSeriesRenderer.setColor(GraphsHelper.getColorCode(i));
        render.addSeriesRenderer(incomeSeriesRenderer);
      }

      render.setInScroll(true);
      render.setPanEnabled(true);
      render.setClickEnabled(false);
      render.setChartTitleTextSize(26);
      render.setShowLabels(true);
      render.setShowLegend(true);
      render.setShowGrid(true);
      render.setBackgroundColor(Color.BLACK);
      render.setLabelsTextSize(26);
      render.setLabelsColor(Color.BLACK);
      render.setLegendTextSize(26);
      render.setZoomButtonsVisible(true);

      GraphicalView chartView;

      chartView = ChartFactory.getPieChartView(getActivity(), getDataSet(), render);

      LinearLayout layout = (LinearLayout) getActivity().findViewById(R.id.dashboard_chart_layout);
      layout.removeAllViews();
      layout.addView(
          chartView, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.FILL_PARENT));
    }