ilog.views.chart.renderer
Class IlvStairChartRenderer

ilog.views.chart.IlvChartRenderer
      extended by ilog.views.chart.renderer.IlvCompositeChartRenderer
          extended by ilog.views.chart.renderer.IlvSimpleCompositeChartRenderer
              extended by ilog.views.chart.renderer.IlvPolylineChartRenderer
                  extended by ilog.views.chart.renderer.IlvStairChartRenderer

public class IlvStairChartRenderer
extends IlvPolylineChartRenderer

A renderer displaying stairs. This renderer creates an instance of IlvSingleStairRenderer for every data set in the connected data source.

For a stair chart, the displayed value at a point x0 within the data range is computed by looking up the data set point with the largest x <= x0 and taking its value.

Note: This renderer only works with data sets whose x-series are sorted in ascending order (see IlvDataSet.isXValuesSorted). To sort a data set into ascending x order, you can use the class IlvXSortedDataSet.

The following figure shows an example of an IlvStairChartRenderer.



CSS example:

ilvStairChartRenderer {
    class : "ilog.views.chart.renderer.IlvStairChartRenderer";
    annotation : "@#ilvDataLabelAnnotation";
    autoTransparency : "false";
    marker : "CIRCLE";
    markerSize : "2";
    mode : "SUPERIMPOSED";
    name : "<value>";
    stacked100Percent : "false";
    stackedByIndex : "false";
    styles[0] : "@#ilvStyle1";
    styles[1] : "@#ilvStyle2";
    visible : "false";
    visibleInLegend : "false";
}


Property Summary
 IlvDataAnnotation annotation
          
Specifies a global annotation for all the data sets displayed by this renderer.
 boolean autoTransparency
          
Sets whether this renderer should use transparent default colors.
 java.lang.String class
          
Creates a new stair chart renderer.
 ilog.views.chart.graphic.IlvMarker marker
          
Specifies a marker for the child polyline renderers.
 int markerSize
          
Specifies a marker size for the child polyline renderers.
 int mode
          
Sets the mode of this renderer.
 java.lang.String name
          
Sets the name of this renderer.
 boolean stacked100Percent
          
Specifies whether the stacking is scaled to 100.
 boolean stackedByIndex
          
Specifies whether the stacking is based on data set indices rather than on X values.
 IlvStyle[] styles
          
Sets the styles used by the child renderers.
 boolean visible
          
Toggles the visibility of this renderer.
 boolean visibleInLegend
          
Indicates whether the renderer appears in the legend.
 

Property Detail

class

public java.lang.String class

Creates a new stair chart renderer.

CSS example:     class : "ilog.views.chart.renderer.IlvStairChartRenderer";


annotation

public IlvDataAnnotation annotation

Specifies a global annotation for all the data sets displayed by this renderer. The specified annotation will also be associated with all the data sets that are connected to this renderer.

CSS example:     annotation : "@#ilvDataLabelAnnotation";

See implementing class IlvDataLabelAnnotation for an example of implementing an annotation.


autoTransparency

public boolean autoTransparency

Sets whether this renderer should use transparent default colors.

CSS example:     autoTransparency : "false";


marker

public ilog.views.chart.graphic.IlvMarker marker

Specifies a marker for the child polyline renderers.

Note: The existing child renderers are not modified by this method. Only subsequent calls to createChild will take the specified marker into account.

CSS example:     marker : "CIRCLE";

Allowed values:
CIRCLE    Predefined circle marker type.
CROSS    Predefined cross marker type.
DIAMOND    Predefined diamond marker type.
PLUS    Predefined plus marker type.
TRIANGLE    Predefined triangle marker type.
SQUARE    Predefined square marker type.
NONE    Predefined internal marker type.


markerSize

public int markerSize

Specifies a marker size for the child polyline renderers.

Note: The existing child renderers are not modified by this method. Only subsequent calls to createChild will take the specified marker into account.

CSS example:     markerSize : "2";

See Also:
marker

mode

public int mode

Sets the mode of this renderer. The mode describes how polylines are laid out.

CSS example:     mode : "SUPERIMPOSED";

Allowed values:
SUPERIMPOSED    Mode type for superimposed polylines.
STACKED    Mode type for stacked polylines.

Two stacking modes are available:

  • Default mode: All the y-values for a given x-value are summed.
  • 100% mode: Each point represents the percentage it contributes to the sum of all the y-values for a given x-value.
You can switch between the two modes with the setStacked100Percent method.

Note: This mode works best with data sets whose x-series are sorted in ascending order (see IlvDataSet.isXValuesSorted). If stacking is performed according to same x values (see setStackedByIndex), data sets that are not sorted this way will be implicitly sorted for display, like the class IlvXSortedDataSet does.


name

public java.lang.String name

Sets the name of this renderer.

CSS example:     name : "<value>";


stacked100Percent

public boolean stacked100Percent

Specifies whether the stacking is scaled to 100. If stacked100 is set to true, the sum of all the y-values for a given x-value is scaled to 100. Each bar represents the percentage it contributes to this sum. This method is only meaningful when the mode of the renderer is set to STACKED.

CSS example:     stacked100Percent : "false";

See Also:
mode

stackedByIndex

public boolean stackedByIndex

Specifies whether the stacking is based on data set indices rather than on X values. If stackedByIndex is set to true, the Y values are computed by accumulating the Y values with the same index, regardless of their X values, and the X values of the second, third, etc. data sets are ignored. If stackedByIndex is set to false, the Y values are computed by accumulating the Y values with the same X value, regardless of their index in the data set. This method is meaningful only when the mode of the renderer is set to STACKED.

CSS example:     stackedByIndex : "false";

See Also:
mode

styles

public IlvStyle[] styles

Sets the styles used by the child renderers. Each child renderer is associated with a style from the specified array.

CSS example:    

styles[0] : "@#ilvStyle1";
styles[1] : "@#ilvStyle2";

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


visible

public boolean visible

Toggles the visibility of this renderer.

CSS example:     visible : "false";


visibleInLegend

public boolean visibleInLegend

Indicates whether the renderer appears in the legend.

The default value of this property is true, which means that the renderer will automatically create and add items to the legend.

CSS example:     visibleInLegend : "false";



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