ilog.views.chart.graphic
Class IlvThresholdIndicator

ilog.views.chart.IlvChartDecoration
      extended by ilog.views.chart.graphic.IlvDataIndicator
          extended by ilog.views.chart.graphic.IlvThresholdIndicator

public class IlvThresholdIndicator
extends IlvDataIndicator

An IlvDataIndicator subclass that defines threshold lines and ranges. An IlvThresholdIndicator instance defines maximum and minimum values on given data sets as well as provides a graphical representation of these limit values. These limit values are actually data set properties and thus can be used through the styling API to define a dynamic styling on a series depending on the threshold values (see below for an example).

Depending on the type of the threshold indicator, the properties for the limit values are:

In addition to these features, an IlvThresholdIndicator supports direct user interactions in order to modify the limit values:

Here is an example of a series styling. The following rules change the color of the series named "dataSet1" depending on whether the datapoint value lies inside the threshold range indicator.

 chart {
   decorations: @|decorations(@#xIndic);
 }
 Subobject#xIndic {
   class:'ilog.views.chart.graphic.IlvThresholdIndicator(axisIndex, range, text, properties)';
   axisIndex: -1;
   range:\"[5;7]\";
   text:'';
   properties:"xThresholdMin,xThresholdMax";
   series:'dataSet1';
 }
 point[\"@|@x-@xThresholdMin\">0][\"@|@x-@xThresholdMax\"<0] {
   color1: #ff0000;
 }
 
CSS example:

ilvThresholdIndicator {
    class : "ilog.views.chart.graphic.IlvThresholdIndicator(yAxisIdx,dataWindow,text,properties)";
    annotationVisible : "false";
    axisIndex : "2";
    drawOrder : "2";
    interactive : "false";
    labelRenderer : "@#ilvLabelRenderer";
    properties[0] : "<value>";
    properties[1] : "<value>";
    range : "@#ilvDataInterval";
    style : "@#ilvStyle";
    text : "<value>";
    value : "3.0";
    visible : "false";
}


Property Summary
 boolean annotationVisible
          
Sets whether the scale annotations are visible.
 int axisIndex
          
Sets the index of the axis to which this indicator is attached.
 java.lang.String class
          
Creates a threshold for the specified data window with the specified text.
 int drawOrder
          
Sets the drawing order of this decoration.
 boolean interactive
          
Sets whether user interactions are enabled for this threshold.
 IlvLabelRenderer labelRenderer
          
Sets the renderer of the text displayed by this indicator.
 java.lang.String[] properties
          
Sets the name of the properties of this threshold indicator.
 IlvDataInterval range
          
Sets the range displayed by this indicator.
 IlvStyle style
          
Specifies the rendering style of this indicator.
 java.lang.String text
          
Sets the text associated with this indicator.
 double value
          
Sets the value displayed by the indicator.
 boolean visible
          
Toggles the visibility of this decoration.
 

Property Detail

class

public java.lang.String class

Creates a threshold for the specified data window with the specified text. The type of this indicator is set to WINDOW.

CSS example:     class : "ilog.views.chart.graphic.IlvThresholdIndicator(yAxisIdx,dataWindow,text,properties)";


annotationVisible

public boolean annotationVisible

Sets whether the scale annotations are visible. The default value is true.

CSS example:     annotationVisible : "false";


axisIndex

public int axisIndex

Sets the index of the axis to which this indicator is attached.

CSS example:     axisIndex : "2";


drawOrder

public int drawOrder

Sets the drawing order of this decoration.

CSS example:     drawOrder : "2";


interactive

public boolean interactive

Sets whether user interactions are enabled for this threshold. The default value is false.

CSS example:     interactive : "false";


labelRenderer

public IlvLabelRenderer labelRenderer

Sets the renderer of the text displayed by this indicator.

CSS example:     labelRenderer : "@#ilvLabelRenderer";

See implementing class IlvLabelRenderer for an example of implementing a labelRenderer.


properties

public java.lang.String[] properties

Sets the name of the properties of this threshold indicator. The returned array contains in the given order:
CSS example:    

properties[0] : "<value>";
properties[1] : "<value>";


range

public IlvDataInterval range

Sets the range displayed by this indicator. This method can only be used if the type of the indicator is X_RANGE or Y_RANGE.

CSS example:     range : "@#ilvDataInterval";

See implementing class IlvDataInterval for an example of implementing a range.


style

public IlvStyle style

Specifies the rendering style of this indicator.

CSS example:     style : "@#ilvStyle";

See implementing class IlvStyle for an example of implementing a style.


text

public java.lang.String text

Sets the text associated with this indicator. Depending on the indicator type, the text is rendered using the fill color of the drawing style for the X_VALUE or Y_VALUE types, or with the stroke color of the drawing style in the other cases.

CSS example:     text : "<value>";


value

public double value

Sets the value displayed by the indicator. This method can only be used if the type of the indicator is X_VALUE or Y_VALUE.

CSS example:     value : "3.0";


visible

public boolean visible

Toggles the visibility of this decoration.

CSS example:     visible : "false";



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.