title: how to ellipsize label of y-axis with bar chart using achartengine
body: <p>I am very new to android Developer Especially for Graph. Now  I am creating a following graph using <strong>AchartEngine</strong> library but i have following problem:</p>
  
  <p><strong>Q-1.</strong> I want to Display label of left side with fixed width and remaining content with ellipsis.</p>
  
  <p><strong>Q-2</strong> When i am going to change orientation from portrait to landscape, graph is display like following second image. How to set Best Layout for graph.?</p>
  
  <p><strong>Q-3</strong> How to set 0 1 2 3...10 at X-axis?</p>
  
  <p>I've written following code for this graph :</p>
  
  <p><strong>createLayoutMethod():</strong></p>
  
  <p>/** For Creating Graph Layout **/</p>
  
  <pre><code>@SuppressWarnings("deprecation")
  private void createGraphLayout() {
      // TODO Auto-generated method stub
      /** Initialixation for Graph */
      /** objext of dataset which is put on Graph*/
      dataset = new XYMultipleSeriesDataset();
      series = new CategorySeries("Number of Customer");
  
  
      renderer = new XYSeriesRenderer();
      //renderer.setColor(Color.rgb(0, 168, 240));
  
      mRenderer = new XYMultipleSeriesRenderer();
  
      /** Setting for Renderer **/
      mRenderer.setLabelsColor(Color.BLACK);
      mRenderer.setBackgroundColor(Color.WHITE);
      mRenderer.setOrientation(Orientation.VERTICAL);
      mRenderer.setClickEnabled(true);
      mRenderer.setLegendTextSize(15);
      mRenderer.setLabelsTextSize(13);
      mRenderer.setApplyBackgroundColor(true);
      mRenderer.setMargins(new int[] {10,10,200,10});
  
      mRenderer.setMarginsColor(Color.WHITE);
      mRenderer.setInScroll(true);
  
      mRenderer.setPanEnabled(true, false);
      mRenderer.setScale(1);
      mRenderer.setXLabelsAlign(Align.RIGHT);         // alignment of label x
      mRenderer.setXAxisMax(offer.length());
      mRenderer.setYLabelsAlign(Align.CENTER);        // alignment of label y
      mRenderer.setXLabelsColor(Color.BLACK);         // color of label x
      mRenderer.setYLabelsColor(0, Color.BLACK);      // color of label y
  
      mRenderer.setLegendHeight(60);
      mRenderer.setDisplayChartValues(true);
  
      mRenderer.setYAxisMax(offer.length());
  
      mRenderer.addSeriesRenderer(renderer);
  
  }
  </code></pre>
  
  <p><strong>putDataOnGraph():</strong> for JSON DATA put on graph :</p>
  
  <pre><code>private void putDataOnGraph() {
          // TODO Auto-generated method stub
          try {
  
              for(int forOffer = 0; forOffer &lt; offer.length(); forOffer++)
              {
                  no_cust = 0;
                  for(int forCust = 0; forCust &lt; customer.length(); forCust++)
                  {
                      if(offer.getJSONObject(forOffer).getInt("id") == customer.getJSONObject(forCust).getInt("offerId") &amp;&amp; customer.getJSONObject(forCust).getInt("status") == 1)
                          no_cust = no_cust+1;
                  }
  
                  /** Check for x-axis maximum than customer **/
                  maxX = no_cust &gt; maxX ? no_cust : maxX;
  
                  mRenderer.setXLabels(0);
                  mRenderer.addXTextLabel(forOffer+1,offer.getJSONObject(forOffer).getString("offerTitle"));
  
  
                  //Log.d("msg", ""+offer.getJSONObject(forOffer).getString("offerTitle") +" : "+no_cust);
                  //Log.d("msg", ""+maxX);
                  series.add(no_cust);
              }
              mRenderer.setYAxisMax(maxX);
              dataset.addSeries(series.toXYSeries());
  
  
          } catch (JSONException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p><strong>Image of Graph (Portrait):</strong>
  <img src="https://i.stack.imgur.com/vjtyH.png" alt="Protrait Image with bar-chart"></p>
  
  <p><strong>Image of Graph (Landscape):</strong>
   <img src="https://i.stack.imgur.com/hNS67.png" alt="Landscape Image with bar-chart"> </p>
  
  <p>Your help would be appreciated. </p>
  
  <p><strong>Thanks in advance....</strong></p>