"unlinkAreas"
    
    With the trend attribute "unlinkAreas" you can unlink two trend areas.
Synopsis
setValue(string shape,"unlinkAreas", string area1, string
                area2);
getValue(string shape,"unlinkAreas", string area1, string
                area2);
shape.unlinkAreas(string area1, string area2);
Parameter
| Parameter | Description | 
|---|---|
| area1 | The first trend area. The index starts at 0. | 
| area2 | The second trend area. | 
Description
With the trend attribute "unlinkAreas" you can unlink two trend areas.
Example
The second example shows how trend areas are fixed (see "areaFixed"), linked (see "linkAreas") and unlinked.
main()
{
  int timeArea = TREND1.numTrendAreas - 1; //Number trend areas -1
  if ( this.toggleState ) //Status of a button (ON = enabled & OFF = disabled).
  {
    if ( !TREND1.areaFixed(timeArea) ) //If trend area is not fixed
    {
      TREND1.addTrendArea(); //Adds a new trend area to the trend
      timeArea++;
      TREND1.timeScaleVisibility(timeArea, true, SCALE_BOTTOM); //Shows a time scale at the bottom of the trend
      TREND1.areaFixed(timeArea, true); //The area is fixed
    }
    int num = TREND1.numTrendAreas;  //Number of trend areas
    for (int i = 0; i < num; i++) //As long as i < number of trend areas
    {
      TREND1.linkAreas(0, i); //link areas
      if ( i != (num - 1) )
        TREND1.timeScaleVisibility(i, false, SCALE_BOTTOM);
    }
  }
  else
  {
    TREND1.removeTrendArea(timeArea); //Delete trend area
    int num = TREND1.numTrendAreas;
    for (int i = 0; i < num; i++)
    {
      TREND1.unlinkAreas(0, i); //unlink areas
      TREND1.timeScaleVisibility(i, true, SCALE_BOTTOM);
    }
  }
}
            
            Assignment
Trend
