ilog.views.chart.renderer
Class IlvBarChartRenderer

ilog.views.chart.IlvChartRenderer
      extended by ilog.views.chart.renderer.IlvCompositeChartRenderer
          extended by ilog.views.chart.renderer.IlvSimpleCompositeChartRenderer
              extended by ilog.views.chart.renderer.IlvBarChartRenderer

public class IlvBarChartRenderer
extends IlvSimpleCompositeChartRenderer

A renderer displaying bars. This renderer creates an instance of IlvSingleBarRenderer for every data set in the connected data source. An IlvBarChartRenderer supports three representation modes:

The following figure illustrates these representation modes:



CSS example:

ilvBarChartRenderer {
    class : "ilog.views.chart.renderer.IlvBarChartRenderer";
    annotation : "@#ilvDataLabelAnnotation";
    autoTransparency : "false";
    barShape : "QUADRILATERAL";
    diverging : "false";
    mode : "SUPERIMPOSED";
    name : "<value>";
    overlap : "3.0";
    stacked100Percent : "false";
    stackedByIndex : "false";
    styles[0] : "@#ilvStyle1";
    styles[1] : "@#ilvStyle2";
    useCategorySpacingAtBorders : "false";
    visible : "false";
    visibleInLegend : "false";
    widthPercent : "3.0";
}


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.
 int barShape
          
Sets the shape of the bars.
 java.lang.String class
          
Creates a new IlvBarChartRenderer, with a default bar width and the CLUSTERED mode.
 boolean diverging
          
Specifies whether negative values are stacked separately from positive values.
 int mode
          
Sets the mode of this renderer.
 java.lang.String name
          
Sets the name of this renderer.
 double overlap
          
Modifies the overlapping amount.
 boolean stacked100Percent
          
Specifies the stacking mode.
 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 useCategorySpacingAtBorders
          
Determines whether the category spacing is used also at the left and right borders.
 boolean visible
          
Toggles the visibility of this renderer.
 boolean visibleInLegend
          
Indicates whether the renderer appears in the legend.
 double widthPercent
          
Sets the width of the graphical representation of a data point.
 

Property Detail

class

public java.lang.String class

Creates a new IlvBarChartRenderer, with a default bar width and the CLUSTERED mode.

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


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";


barShape

public int barShape

Sets the shape of the bars. Note: This has no effect in 3-D mode.

CSS example:     barShape : "QUADRILATERAL";

Allowed values:
QUADRILATERAL    In this mode, every bar has a quadrilateral (4-gon) shape.
POLYGON    In this mode, every bar has a polygonal shape that approximates the exact projected shape.
EXACT    In this mode, every bar has an exact projected rectangle shape. This means, in a polar or radar chart, every bar's boundary will contain an arc.


diverging

public boolean diverging

Specifies whether negative values are stacked separately from positive values. This method is meaningful only when the mode of the renderer is set to STACKED.

If diverging is set to true, positive y values will be stacked together in a bar towards positive values, and negative y values will be stacked together in a bar in the opposite direction. This rendering mode makes it easy to visually understand negative values.

Warning: This mode assumes that there is no particular order among the data sets; the data points belonging to negative y values are reordered, as if they all came before the positive y values.

Warning: Also, in this mode, the largest displayed y value is no longer the sum of all y values; rather, it is the sum of all positive y values. This can be confusing for the user.

Note: In this release, this mode has no effect when the stackedByIndex property is set to true or when the stacked100Percent property is set to true.

CSS example:     diverging : "false";


mode

public int mode

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

CSS example:     mode : "SUPERIMPOSED";

Allowed values:
SUPERIMPOSED    Mode type for superimposed bars. Superimposed bars are drawn on top of each other. The width of each bar is computed automatically so that only part of the bars is covered.
CLUSTERED    Mode type for clustered bars. Bars are laid out in clusters, according to two criteria:
  • The cluster width, which specifies the amount of space available for each cluster.
  • The overlap, which specifies the amount by which bars overlap within a cluster.
STACKED    Mode type for stacked bars.

Two stacking modes are available:

  • Default mode: All the y-values for a given x-value are summed.
  • 100% mode: Each bar 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.


name

public java.lang.String name

Sets the name of this renderer.

CSS example:     name : "<value>";


overlap

public double overlap

Modifies the overlapping amount. The overlap parameter can take values between 0 and 100. It specifies the amount by which bars overlap. This method is meaningful only when the mode of the renderer is set to CLUSTERED.

CSS example:     overlap : "3.0";


stacked100Percent

public boolean stacked100Percent

Specifies the stacking mode. 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 meaningful only 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.


useCategorySpacingAtBorders

public boolean useCategorySpacingAtBorders

Determines whether the category spacing is used also at the left and right borders. If set to true, category spacing is not only used between bars, but also beyond the leftmost and rightmost bars. If set to false (the default), this spacing is omitted. This setting matters only if getWidthPercent is less than 100.

CSS example:     useCategorySpacingAtBorders : "false";


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";


widthPercent

public double widthPercent

Sets the width of the graphical representation of a data point.

CSS example:     widthPercent : "3.0";



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