title: gradient color for Line Chart inside AchartEngine
body: <p>I am Using AchartEngine to Draw a Line Chart.</p>
  
  <p><strong>What I have Done:</strong> I want to Make The LineGraph with Using Achart Engine. But with Different Color Gradient enabled like we do in Barchart.</p>
  
  <p>I have Make the Line chart with No Worries.</p>
  
  <p>I know Gradient is only supported by the range bar chart in Achart Engine. But though there should be some Workaround for this if any one have.</p>
  
  <p>I have Do My Code is As Below :</p>
  
  <pre><code>public GraphicalView graph(Context context) {
          String[] titles = new String[] { "Nike Line Graph" };
          List&lt;double[]&gt; values = new ArrayList&lt;double[]&gt;();
  
          values.add(new double[] { 14230, 12300, 14240, 15244, 14900, 12200,
                  11030, 12000, 12500, 15500, 14600, 15000 });
  
  
          int length = values.get(0).length;
  
          Log.d("****length*********", "" + length);
  
          int[] colors = new int[] { Color.GREEN };
          PointStyle[] styles = new PointStyle[] { PointStyle.POINT };
  
          XYMultipleSeriesRenderer renderer = buildRenderer(colors, styles);
          setChartSettings(renderer, "Monthly sales in the last 2 years",
                  "Month", "Units sold", 0.75, 12.25, 10000, 19000,
                  Color.argb(0x00, 0x01, 0x01, 0x01),
                  Color.argb(0x00, 0x01, 0x01, 0x01));
  
          renderer.setChartTitleTextSize(20);
          renderer.setTextTypeface("sans_serif", Typeface.BOLD);
          renderer.setLabelsTextSize(0f);
          renderer.setLabelsColor(Color.argb(0x00, 0x01, 0x01, 0x01));
          renderer.setAxisTitleTextSize(15);
          renderer.setApplyBackgroundColor(true);
          renderer.setBackgroundColor(Color.argb(0x00, 0x01, 0x01, 0x01));
          renderer.setLegendTextSize(15);
          renderer.setScale(10);
          renderer.setShowAxes(false);
          renderer.setXLabelsColor(Color.argb(0x00, 0x01, 0x01, 0x01));
          renderer.setYLabelsColor(0, Color.argb(0x00, 0x01, 0x01, 0x01));
          renderer.setMarginsColor(Color.argb(0x00, 0x01, 0x01, 0x01));
  
          renderer.setPanEnabled(false, false);
          renderer.setZoomEnabled(false, false);
          length = renderer.getSeriesRendererCount();
          SimpleSeriesRenderer r1 = new SimpleSeriesRenderer();
  
          r1.setGradientEnabled(true);
          r1.setGradientStart(-50, Color.BLACK);
          r1.setGradientStop(50, Color.GREEN);
  
  
  
          Log.d("****length*********", "" + length);
  
          for (int i = 0; i &lt; length; i++) {
              XYSeriesRenderer r = (XYSeriesRenderer) renderer
                      .getSeriesRendererAt(i);
              r.setLineWidth(5f);
          }
  
          GraphicalView v = ChartFactory.getCubeLineChartView(context,
                  buildBarDataset(titles, values), renderer, 0.5f);
          return v;
  
      }
  </code></pre>
  
  <p>With Having the Method : </p>
  
  <pre><code>protected XYMultipleSeriesRenderer buildRenderer(int[] colors,
              PointStyle[] styles) {
          XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
          setRenderer(renderer, colors, styles);
          return renderer;
      }
  
      protected void setRenderer(XYMultipleSeriesRenderer renderer, int[] colors,
              PointStyle[] styles) {
          renderer.setAxisTitleTextSize(16);
          renderer.setChartTitleTextSize(20);
          renderer.setLabelsTextSize(15);
          renderer.setLegendTextSize(15);
          renderer.setPointSize(5f);
  
          renderer.setMargins(new int[] { 20, 30, 15, 20 });
          int length = colors.length;
          for (int i = 0; i &lt; length; i++) {
  
               XYSeriesRenderer r = new XYSeriesRenderer();
                r.setColor(colors[i]);
               r.setPointStyle(styles[i]);    
               renderer.addSeriesRenderer(r);     
  
          }
  </code></pre>
  
  <p>What I am Getting this is ScreenShot as Below :</p>
  
  <p><img src="https://i.stack.imgur.com/8Qod8.png" alt="enter image description here"></p>
  
  <p><strong>What i Want :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/nhepe.jpg" alt="enter image description here"></p>
  
  <p><strong>Question :</strong> I want to Add Gradient colors to this Line chart. from one color to another.</p>
  
  <p>Any Help would be Highly Appreciated.</p>
  
  <p>Thank in Advance.</p>