How to set a background image in graph?
<p>I am implementing one app related to graphs.</p>

<p>I am trying to set one image as a background of graph.</p>

<p>But it is set only inside  of graph.not set total layout.</p>

<p>my code is as fallows.</p>

<p>............................................................</p>

<p>layout = (LinearLayout) findViewById(R.id.linearLayout1);</p>

<pre><code>        XYMultipleSeriesRenderer renderer = getBarDemoRenderer();
        setChartSettings(renderer, "Call Duration/Incoming", "my chart", "", 0.5, 12.5,
                0, 60, 0, Color.LTGRAY);
        mChartView = ChartFactory.getBarChartView(BarchartExampleActivity.this, getBarDemoDataset(renderer), renderer, Type.STACKED);
        layout.addView(mChartView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));


}
public XYMultipleSeriesRenderer getBarDemoRenderer() 
{

      XYMultipleSeriesRenderer renderer = buildBarRenderer();
        renderer.setBarSpacing(0.5);
        renderer.setXLabels(0);
        renderer.setYLabels(10);
        renderer.addXTextLabel(1, "1");
        renderer.addXTextLabel(2, "2");
        renderer.addXTextLabel(3, "3");
        renderer.addXTextLabel(4, "4");
        renderer.addXTextLabel(5, "5");
        renderer.addXTextLabel(6, "6");
        renderer.addXTextLabel(7, "7");
        renderer.addXTextLabel(8, "8");
        renderer.addXTextLabel(9, "9");
        renderer.addXTextLabel(10, "10");













        renderer.setYLabelsAlign(Align.RIGHT);

        SimpleSeriesRenderer r = renderer.getSeriesRendererAt(0);
</code></pre>

<p>//          r.setDisplayChartValues(true);
            r.setChartValuesTextSize(12);
            r.setChartValuesSpacing(7);
            r.setGradientEnabled(true);
            r.setGradientStart(0, Color.BLUE);
            r.setGradientStop(20, Color.GREEN);</p>

<pre><code>        return renderer;

}
 protected XYMultipleSeriesRenderer buildBarRenderer() 
  {
      Log.v("abstract","bbb");
    XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
    renderer.setAxisTitleTextSize(16);
    renderer.setChartTitleTextSize(20);
    renderer.setLabelsTextSize(15);
    renderer.setLegendTextSize(15);


    for (int i = 0; i &lt; 1; i++) 
    {
      SimpleSeriesRenderer r = new SimpleSeriesRenderer();

      renderer.addSeriesRenderer(r);
    }
    return renderer;
  }
 protected void setChartSettings(XYMultipleSeriesRenderer renderer, String title, String xTitle,
          String yTitle, double xMin, double xMax, double yMin, double yMax, int axesColor,
          int labelsColor) 
      {
          Log.v("abstract","555"+title  +xMin   +yMin);
          renderer.setShowLegend(false);
        renderer.setChartTitle(title);
        renderer.setXTitle(xTitle);
        renderer.setYTitle(yTitle);
        renderer.setXAxisMin(xMin);
        renderer.setXAxisMax(xMax);
        renderer.setYAxisMin(yMin);
        renderer.setYAxisMax(yMax);
        renderer.setShowGrid(true);



      }
 private XYMultipleSeriesDataset getBarDemoDataset(XYMultipleSeriesRenderer renderer) 
    {
     double[] minValues = new double[]    {0, 0, 0,0,  0,0,  0,0,  0,0,  0,0, 0};
        double[] maxValues = new double[] { 7,0,10,0, 24,0, 30,0, 35,0, 40, 0,45};

        XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
        RangeCategorySeries series = new RangeCategorySeries("");
        int length = minValues.length;
        for (int k = 0; k &lt; length; k++) 
        {
         series.add(minValues[k], maxValues[k]);
        }
        dataset.addSeries(series.toXYSeries());
        return dataset;    
    }
</code></pre>

<p>I am setting background to the layout.</p>

<p>But it is not set total layout.</p>

<p>How to set a background image to a graph?</p>

<p>I f any one has solution please help me.</p>

<p>Thanks in advance.</p>
