aspose.cells

Class TrendlineCollection

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

Example:

$workbook = new cells\Workbook();
$cells = $workbook->getWorksheets()->get(0)->getCells();
//Put values in cells
$cells->get("A1")->putValue(1);
$cells->get("A2")->putValue(2);
$cells->get("A3")->putValue(3);
$chartIndex = $workbook->getWorksheets()->get(0)->getCharts()->add(cells\ChartType::COLUMN, 3, 3, 15, 10);
$chart = $workbook->getWorksheets()->get(0)->getCharts()->get($chartIndex);
$chart->getNSeries()->add("A1:a3", true);
$chart->getNSeries()->get(0)->getTrendLines()->add(cells\TrendlineType::LINEAR, "MyTrendLine");
$line = $chart->getNSeries()->get(0)->getTrendLines()->get(0);
$line->setDisplayEquation(true);
$line->setDisplayRSquared(true);
$line->setColor(cells\Color::getRed());

Property Getters/Setters Summary
functiongetCount()
functionget(index)
Gets a object by its index.
 
Method Summary
functionadd(type)
Adds a object to this collection with specified type.
functionadd(type, name)
Adds a object to this collection with specified type and name.
functionadd(value)
Reserved for internal use.
functionclear()
functioncontains(value)
Reserved for internal use.
functionget(index)
Reserved for internal use.
functionindexOf(value)
Reserved for internal use.
functioniterator()
functionremoveAt(index)
 

    • Property Getters/Setters Detail

      • getCount : Number 

        function getCount()
        
    • Method Detail

      • add

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

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

        function clear()
      • removeAt

        function removeAt(index)
      • iterator

        function iterator()
      • get

        function get(index)
        Reserved for internal use.
      • contains

        function contains(value)
        Reserved for internal use.
      • add

        function add(value)
        Reserved for internal use.
      • indexOf

        function indexOf(value)
        Reserved for internal use.