Control API for Chart (chart)

A control to visualize data in annotated diagrams.

  • axisMaxVal
    Used to calculate the annotation and scaling of the chart. 'axisMaxVal' specifies the maximum value the axis is annotated with. If 'axisMaxVal' is not specified or a value is specified that is less than the maximum value provided by he model, 'axisMaxVal' is set to the maximum value of the model.
  • axisMinVal
    Used to calculate the annotation and scaling of the chart. 'axisMinVal' specifies the minimum value of the axis. If 'axisMinVal' is not specified or a value is specified that is greater than the minimum value provided by he model, 'axisMinVal' is set to 0.
  • chartType
    Controls the style in which the data is displayed.
    • AREA

     

    • AREA_3D

     

    • AREA_STACKED

     

    • AREA_STACKED_3D

     

    • BARS

     

    • BARS_3D

     

    • BARS_STACKED

     

    • BARS_STACKED_3D

     

    • BITMAP

     

    • COLUMNS

     

    • COLUMNS_3D

     

    • COLUMNS_STACKED

     

    • COLUMNS_STACKED_3D

     

    • LINES

     

    • LINES_3D

     

    • PIE

     

    • PIE_3D

     

    • PIE_EX

     

    • PIE_EX_3D

     

    • PIE_SPLIT

     

    • PYRAMID

     

    • TREND

 

  • colorOrder
    The various types of the chart control all use the same set of colors to visualize the values of a data set, but explore the space of possible colors on different paths. The following pictures show the three predefined color schemes and the chart types using them.
    • STRAIGHT
      This color scheme is used by the various area, column and bar chart graphs.


     

    • SNAKE
      This color scheme is used by the pie chart graphs.


     

    • REVERSE
      This color scheme is used by the line chart graphs.



  • displayObjectValues
    A boolean value that controls if the values is displayed with the object .

    displayObjectValues = "false"


    displayObjectValues = "true"


Note: Not all
'ChartType' settings support the display of values. The example pictures in the 'chartType' attribute description show which types support the display of values.

  • height
    Defines the overall height of the chart. The height includes the 'title', 'titleValues' and 'legendPosition'.
  • id
    Identification name of the chart.
  • legendPosition
    Controls the position of the legend.
    • EAST
      Places the legend on the right side of the chart.
    • NONE
      The legend will be suppressed.
    • NORTH
      Places the legend on top of the chart.
    • SOUTH
      Places the legend under the chart.
    • WEST
      Places the legend left of the chart.

     

  • model
    Defines the model which provides the chart with data.
  • title
    Specifies the headline of the chart.

 

  • titleCategories
    Specifies the axis title for the categories.

 

  • titleValues
    Specifies the axis title for the values.
  • visible
    A boolean value that defines if the chart is visible.
  • width
    Defines the width of the chart. The width include 'titleCategories' and the 'legendPosition'.
Attribute Req. Values Default case sens JSP Taglib Classlib
axisMaxVal no Numeric defined by model - axisMaxVal="2000" setAxisMaxVal(2000)
axisMinVal no Numeric defined by model - axisMinVal="100" setAxisMinVal(100)
chartType no AREA
AREA_3D
AREA_STACKED
AREA_STACKED_3D
BARS
BARS_3D
BARS_STACKED
BARS_STACKED_3D
BITMAP
COLUMNS
COLUMNS_3D
COLUMNS_STACKED
COLUMNS_STACKED_3D
LINES
LINES_3D
PIE
PIE_3D
PIE_EX
PIE_EX_3D
PIE_SPLIT
PYRAMID
TREND
BARS_3D yes chartType="PIE" setChartType(ChartType.PIE)
colorOrder no DEFAULT
STRAIGHT
REVERSE
SNAKE
DEFAULT yes colorOrder="SNAKE" setColorOrder
(ChartColorOrder.SNAKE)
displayObjectValues no FALSE
TRUE
FALSE yes displayObjectValues=
"TRUE"
setDisplayObjectValues(true)
height no Unit 200 - height="300" setHeight("300")
id yes String none yes id="VacationPlanner" setId("VacationPlanner")
legendPosition no EAST
NONE
NORTH
SOUTH
WEST
EAST yes legendPosition="SOUTH" setLegendPosition
(ChartLegendPosition.SOUTH)
model yes String none yes model="myBean.model" setModel
((IChartModel) model)
title no String none no title="Bill board chart" setTitle("Bill board chart")
titleCategories no String none no titleCategories="Brand" setTitleCategories("Brand")
titleValues no String none no titleValues("Overview") setTitleValues("Overview")
visible no FALSE
TRUE
TRUE yes visible="FALSE" setVisible(false)
width no Unit 500 - width="400" setWidth("400")

 

Example using the taglib
<hbj:chart
           id="myChart1"
           model="myChartBean.model"
           visible="true"
           displayObjectValues="true"
           titleCategories="Company"
           titleValues="Turnover"
           title="Washers by Companies!"
           chartType="BARS_3D"
           legendPosition="EAST"
           colorOrder="STRAIGHT"
/>
Example using the classlib.
Form form = (Form)this.getForm();
Chart myChart = new Chart();
myChart.setVisible(true);
myChart.setDisplayObjectValues(true);
myChart.setTitleCategories("Company");
myChart.setTitleValues("Turnover");
myChart.setTitle("Washers by Companies!");
myChart.setChartType(ChartType.BARS_3D);
myChart.setLegendPosition(ChartLegendPosition.EAST);
myChart.setColorOrder(ChartColorOrder.STRAIGHT);
   
MyVecBean myVecBean = new MyVecBean();
IChartModel chartModel = myVecBean.getModel();
myChart.setModel(chartModel);
form.addComponent(myChart);
               
Result