How to display graph with in the class?
<p>i am implementing one app related to graphs.</p>

<p>in my app i have three tabs.</p>

<p>firest tab display info,</p>

<p>second tab display graph.</p>

<p>when i click the second tab the graph will open.</p>

<p>but the tabs are disappear.</p>

<p>i want to display the graph in side the second tab only.</p>

<p>Below is my code
.................................</p>

<pre><code>protected void onCreate(Bundle savedInstanceState) 
{

    super.onCreate(savedInstanceState);
    setContentView(R.layout.calls);

          Log.v("values","333");


        //  creategraph(this);
        startActivity(new Intent(creategraph(this)));



      }

private Intent creategraph(Context con)
{
       double[] minValues = new double[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0};
        double[] maxValues = new double[] { 7, 0, 24,0, 33,0, 37,0, 28, 0, 11,0,5 };

        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());
        int[] colors = new int[] { Color.CYAN };
        XYMultipleSeriesRenderer renderer = buildBarRenderer(colors);
        setChartSettings(renderer, "Call Duration/Incoming", "", "", 0.5, 12.5,
            0, 60, Color.GRAY, Color.LTGRAY);
        renderer.setBarSpacing(0.5);
        renderer.setXLabels(0);
        renderer.setYLabels(10);
        renderer.addXTextLabel(1, "Sun");

        renderer.addXTextLabel(3, "Mon");

        renderer.addXTextLabel(5, "Tue");

        renderer.addXTextLabel(7, "Wed");

        renderer.addXTextLabel(9, "Thu");

        renderer.addXTextLabel(11, "Fri");

        renderer.addXTextLabel(13, "Sat");



        renderer.setYLabelsAlign(Align.RIGHT);
        SimpleSeriesRenderer r = renderer.getSeriesRendererAt(0);
        r.setDisplayChartValues(true);
        r.setChartValuesTextSize(12);
        r.setChartValuesSpacing(3);
        r.setGradientEnabled(true);
        r.setGradientStart(0, Color.BLUE);
        r.setGradientStop(20, Color.GREEN);
        return ChartFactory.getRangeBarChartIntent(con, dataset, renderer, Type.DEFAULT,"Temperature range");
}

protected XYMultipleSeriesRenderer buildBarRenderer(int[] colors) 
  {
      Log.v("abstract","bbb");
    XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
    renderer.setAxisTitleTextSize(16);
    renderer.setChartTitleTextSize(20);
    renderer.setLabelsTextSize(15);
    renderer.setLegendTextSize(15);
    int length = colors.length;
    for (int i = 0; i &lt; length; i++) {
      SimpleSeriesRenderer r = new SimpleSeriesRenderer();
      r.setColor(colors[i]);
      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.setChartTitle(title);
        renderer.setXTitle(xTitle);
        renderer.setYTitle(yTitle);
        renderer.setXAxisMin(xMin);
        renderer.setXAxisMax(xMax);
        renderer.setYAxisMin(yMin);
        renderer.setYAxisMax(yMax);
        renderer.setAxesColor(axesColor);
        renderer.setLabelsColor(labelsColor);
      }

}
</code></pre>

<p>if any one know the solution please help me</p>

<p>thanks in advance</p>
