title: Drawing bar graph with achartengine
body: <p>I am trying to generate a bar chart using achartengine . Bu I am getting error.
  And my code is :</p>
  
  <pre><code>public GraphicalView getGraph(String[] labels,double[] values){
          CategorySeries series = new CategorySeries(null);
          for(int i = 0 ; i &lt; labels.length ;i++){
              series.add(labels[i], values[i]);
          }
          XYSeries mSeries = series.toXYSeries();
          XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
          dataset.addSeries(mSeries);
          XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
          renderer.setAxesColor(Color.BLUE);
          renderer.setBackgroundColor(Color.GREEN);
          renderer.setChartTitle("Exa");
  
          SimpleSeriesRenderer sRenderer = new SimpleSeriesRenderer();
          sRenderer.setColor(Color.BLUE);
          renderer.addSeriesRenderer(sRenderer);
          GraphicalView v = ChartFactory.getBarChartView(context, dataset, renderer,Type.DEFAULT);
          return v;
      }
  </code></pre>
  
  <p>What is wrong in this code?</p>