com.aspose.cells

Class TrendlineCollection

  • java.lang.Object
  • All Implemented Interfaces:
    java.lang.Iterable
    public class TrendlineCollection 
    extends CollectionBase

Represents a collection of all the Trendline objects for the specified data series.

Example:

int chartIndex = excel.getWorksheets().get(0).getCharts().add(ChartType.COLUMN, 3, 3, 15, 10);
Chart chart = excel.getWorksheets().get(0).getCharts().get(chartIndex);
chart.getNSeries().add("A1:a3", true);
chart.getNSeries().get(0).getTrendLines().add(TrendlineType.LINEAR, "MyTrendLine");
Trendline line = chart.getNSeries().get(0).getTrendLines().get(0);
line.setDisplayEquation(true);
line.setDisplayRSquared(true);
line.setColor(Color.getRed());

Property Getters/Setters Summary
intgetCount()
Trendlineget(intindex)
Gets a object by its index.
 
Method Summary
intadd(inttype)
Adds a object to this collection with specified type.
intadd(inttype, java.lang.Stringname)
Adds a object to this collection with specified type and name.
intadd(java.lang.Objectvalue)
Reserved for internal use.
voidclear()
booleancontains(java.lang.Objectvalue)
Reserved for internal use.
java.lang.Objectget(intindex)
Reserved for internal use.
intindexOf(java.lang.Objectvalue)
Reserved for internal use.
java.util.Iteratoriterator()
voidremoveAt(intindex)
 

    • Property Getters/Setters Detail

      • getCount

        public int getCount()
        
    • Method Detail

      • add

        public int add(int type)
        Adds a object to this collection with specified type.
        Parameters:
        type - A TrendlineType value. Trendline type.
        Returns:
        Trendline object index.
        See Also:
        Trendline
      • add

        public int add(int type, java.lang.String name)
        Adds a object to this collection with specified type and name.
        Parameters:
        type - A TrendlineType value. Trendline type.
        name - Trendline name.
        Returns:
        Trendline object index.
        See Also:
        Trendline
      • clear

        public void clear()
      • removeAt

        public void removeAt(int index)
      • iterator

        public java.util.Iterator iterator()
      • get

        public java.lang.Object get(int index)
        Reserved for internal use.
      • contains

        public boolean contains(java.lang.Object value)
        Reserved for internal use.
      • add

        public int add(java.lang.Object value)
        Reserved for internal use.
      • indexOf

        public int indexOf(java.lang.Object value)
        Reserved for internal use.