Packageeng.series
Classpublic class Bar2DSeries
InheritanceBar2DSeries Inheritance CartesianSeries Inheritance Series
SubclassesBar3DSeries, HTarget2DGoalSeries, HTarget2DResultSeries

The instance of the Bar2DSeries class is set to the series property of the instance of the Bar2DChart class.

The Bar2DSeries class processes the dataset in the chart and represents the horizontal bar chart.

You can create a layout in the following format:

  <KoolChart backgroundColor="0xFFFFEE"  borderRadius="12" borderStyle="solid">
   <Options>
    <Caption text="Monthly Report"/>
  </Options>
  <Bar2DChart showDataTips="true">
   <horizontalAxis>
     <CategoryAxis categoryField="Month" />
    </horizontalAxis>
    <series>
     <Bar2DSeries xField="Profit"/>
     <Bar2DSeries xField="Cost" />
     <Bar2DSeries xField="Revenue" />
    </series>
   </Bar2DChart>
  </KoolChart>
  



Styles
 StyleDescriptionDefined by
  
alwayShowLabels
Type: Boolean

Indicates whether to display labels even when there is not enough space to display all labels.
If the value is true, the labels are always displayed; if false, the label is not displayed when the space is insufficient.

The default value is true.
Bar2DSeries
  
alwayShowLines
Type: Boolean

If the lineToEachItems property is true, indicates whether to connect the line to the data point whose value is 0.

The default value is false.
Bar2DSeries
  
barWidthRatio
Type: Number

Sets the width of the bar as the ratio of the width of the category. (range is 0 to 1)
A value of 1 means that the entire region is used; a value of 0.6 means that the available space of the bar is 60%.
The actual width is the smaller value of the barWidthRatio property
and the maxbarWidth property.

The default value is 0.65.
Bar2DSeries
 Inherited Type: String

Sets the name of the series.

The value of this property is displayed in the tooltips and in the legend by default.
Series
 Inherited Type: String

Sets the shape of the error range.
The valid values are both, plus and minus.

CartesianSeries
 Inherited Type: Number

Sets a fixed value for the error range.

CartesianSeries
 Inherited Type: Number

Sets the width of the error range bar.

CartesianSeries
 Inherited Type: Number

Sets a percentage value for the error range.

CartesianSeries
 Inherited Type: Object

Sets the line style of the error range.
The valid value is an instance of the Stroke class.

CartesianSeries
 Inherited Type: Object

Sets the color to use when painting the item.

Series
 Inherited Type: String
Sets the JavaScript function to be called to display the user-defined color.
Series
 Inherited Type: Array
Sets the color array to use when painting the item.
Series
 Inherited Type: Object

Sets the formatter (NumberFormatter, CurrencyFormatter, DateFormatter) for representing numeric values in the desired numeric (currency, date) format.

Series
  
halfWidthOffset
Type: Number

If multiple bars exist, sets the size of the space between neighboring bars in pixels.
If there are two instances of the Bar2DSeries class and the value of the halfWidthOffset property is 0.5, there is 1px of the space between the two bars.

The default value is 0.
Bar2DSeries
 Inherited Type: Object

Sets the horizontal axis to which the series refers.
If not set, it refers to the axis set in the horizontalAxis property of the chart.

CartesianSeries
 Inherited
id
Type: String

Sets the identifier of the object.

Series
  
insideLabelField
Type: String

Sets the field name of the data to be displayed as a label if the labelPosition property is inside or both.
This property is ignored if the insideLabelJsFunction property is set and a user-defined label is displayed.

Bar2DSeries
  
insideLabelJsFunction
Type: String

Sets the JavaScript function to be called to display the user-defined label when the labelPosition property is inside or both.

  e.g.) <Bar2DSeries xField="Profit" insideLabelJsFunction="insideLabelFunc">
  

The function signature of insideLabelJsFunction is as follows:

  function_name(seriesId, index, data, values) { ... }
  
seriesId: The series identifier.
index: The index value of the item.
data: The data value of the item.
values: The values of the item. They are passed as an array as follows:
  • Bar Series (Bar2DSeries, Bar3DSeries) 0: X-axis value, 1: Y-axis value
Bar2DSeries
  
insideLabelXOffset
Type: Number

Sets the offset value of the label for the horizontal position (X-axis value) if the labelPosition property is inside or both.

The default value is 0.
Bar2DSeries
  
insideLabelYOffset
Type: Number

Sets the offset value of the label for the vertical position (Y-axis value) if the labelPosition property is inside or both.

The default value is 0.
Bar2DSeries
  
interpolateValueLines
Type: Boolean

Indicates whether null values are treated as equal to zero.

The default value is false.
Bar2DSeries
  
itemRenderer
Type: Object

Sets the class that renders the shape of the bar to be represented in the data point (item) on the chart.
The valid values are "BoxItemRenderer", "GradientBarItemRenderer" and "SemiCircleBarItemRenderer".

The default value is "GradientBarItemRenderer".
Bar2DSeries
  
labelAlign
Type: String

If the label appears inside the bar, sets the location of the label.
Applies only if the labelPostion property is inside.
The valid values are "left", "center" and "right".

The default value is "center".
Bar2DSeries
  
labelPosition
Type: String

Sets the position on the data point where the data value (numeric label) is displayed.
The valid values are "inside" , "outside", "both" and "none".

The default value is "none".
Bar2DSeries
  
lineToEachItems
Type: Boolean

Indicates whether to display the line that connects data points.

The default value is false.
Bar2DSeries
  
linkLabelColor
Type: String

Sets the color of the line that connects data points.

The default value is "#000000".
Bar2DSeries
  
linkLabelFontFamily
Type: String

Sets the font name of the label of the line that connects data points.

The default value is "arial".
Bar2DSeries
  
linkLabelFontSize
Type: Number

Sets the font size of the label of the line that connects data points.

The default value is 11.
Bar2DSeries
  
linkLabelFontWeight
Type: String

Sets the font style of the label of the line that connects data points.
The valid values are "normal" and "bold".

The default value is "normal".
Bar2DSeries
  
linkLabelNegativeColor
Type: String

Sets the color of the line that connects data points if the value is negative.

The default value is "#0054ff".
Bar2DSeries
  
linkLabelPositiveColor
Type: String

Sets the color of the line that connects data points if the value is positive.

The default value is "#ff3636".
Bar2DSeries
  
linkLabelXOffset
Type: Number

Sets the offset value of the label of the line that connects data points for the horizontal position (X-axis value).

The default value is 0.
Bar2DSeries
  
linkLabelYOffset
Type: Number

Sets the offset value of the label of the line that connects data points for the vertical position (Y-axis value).

The default value is 0.
Bar2DSeries
  
linkLineStroke
Type: Object

Sets the line that connects data points.
The valid value is an instance of the Stroke class.

Bar2DSeries
  
maxBarWidth
Type: Number

Sets the width of the bar in pixels.
The actual width is the smaller value of the barWidthRatio property
and the maxbarWidth property.

The default value is NaN.
Bar2DSeries
  
minField
Type: String

Sets the field name of the data that provides additional information in addition to the X, Y coordinate values.
For example, you can create a From-To chart by setting the field name of the data that corresponds to the minimum value (minimum).

Bar2DSeries
 Inherited Type: Number

Sets the range of the moving average line if the value of the trendLineType property is movingAverage.

CartesianSeries
  
outsideLabelField
Type: String

Sets the field name of the data to be displayed as a label if the labelPosition property is outside or both.
This property is ignored if the outsideLabelJsFunction property is set and a user-defined label is displayed.

Bar2DSeries
  
outsideLabelJsFunction
Type: String

Sets the JavaScript function to be called to display the user-defined label when the labelPosition property is outside or both.

  e.g.) <Bar2DSeries xField="Profit" outsideLabelJsFunction="outsideLabelFunc">
  

The function signature of outsideLabelJsFunction is as follows:

  function_name(seriesId, index, data, values) { ... }
  
seriesId: The series identifier.
index: The index value of the item.
data: The data value of the item.
values: The values of the item. They are passed as an array as follows:
  • Bar Series (Bar2DSeries, Bar3DSeries) 0: X-axis value, 1: Y-axis value
Bar2DSeries
  
outsideLabelXOffset
Type: Number

Sets the offset value of the label for the horizontal position (X-axis value) if the labelPosition property is outside or both.

The default value is 2.
Bar2DSeries
  
outsideLabelYOffset
Type: Number

Sets the offset value of the label for the vertical position (Y-axis value) if the labelPosition property is outside or both.

The default value is 0.
Bar2DSeries
 Inherited Type: Number

Sets the order for the polynomial if the value of the trendLineType property is polynomial.

CartesianSeries
 Inherited Type: Object

Sets the animation effect in which data is represented on the chart.

The valid values are as follows:
  • SeriesInterpolate - Represents an animation effect as the data is rendered on the screen from the minimum point on the axis to the point corresponding to the data value.
  • SeriesSlide - Represents a sliding effect.
CartesianSeries
 Inherited Type: Boolean

Indicates whether to display the error range.

CartesianSeries
  
showLinkLabels
Type: Boolean

Indicates whether to display the comparison value label of the previous data and the current data when the value of the lineToEachItems property is true.

The default value is true.
Bar2DSeries
 Inherited Type: Boolean

Indicates whether to display the trendline.

CartesianSeries
 Inherited Type: Boolean

Indicates whether to display the formula of the trendline.

CartesianSeries
 Inherited Type: Boolean

Indicates whether to display the R-squared value.

CartesianSeries
  
showValueLabels
Type: Array

Sets to display only the specified items when the label is displayed by the labelPosition property. Specifies an index array of items.
For example, if you only need to display items whose indexes are 1, 5, and 10, set showValueLables = "[1,5,10]".

Bar2DSeries
 Inherited Type: Boolean

Indicates whether to automatically sort the dataset based on the X-axis data.

If false, the data is displayed in the chart in the order in which it was entered.
1.
CartesianSeries
 Inherited Type: Boolean

Indicates whether to automatically sort the dataset based on the Y-axis data.

If false, the data is displayed in the chart in the order in which it was entered.
1.
CartesianSeries
  
stroke
Type: Object

Sets the line of the shape represented by the item renderer (itemRenderer).
The valid value is an instance of the Stroke class.

Bar2DSeries
 Inherited Type: String

Sets the style name defined in the Style node.

Series
 Inherited Type: Number

Sets the text color of the formula of the trendline and the R-squared value.

CartesianSeries
 Inherited Type: String

Sets the type of the trendline.

  • segment
  • curve
  • step
  • reverseStep
CartesianSeries
 Inherited Type: String

Sets the horizontal alignment of the formula of the trendline and the R-squared value.

The valid values are none, left, center and right.
CartesianSeries
 Inherited Type: String

Sets the display order of the formula of the trendline and the R-squared value.

The valid values are none and reverse.
CartesianSeries
 Inherited Type: String

Sets the vertical alignment of the formula of the trendline and the R-squared value.

The valid values are none, top, middle and bottom.
CartesianSeries
 Inherited Type: Object

Sets the style of the trendline.

The valid value is an instance of the Stroke class.
CartesianSeries
 Inherited Type: String

Sets the trendline type.

The valid values are as follows:
  • linear - Linear type
  • logarithmic - Log type
  • exponential - Exponential type
  • polynomial - Polynomial type
  • power - Power type
  • movingAverage - Moving average line type
CartesianSeries
 Inherited Type: String

Sets the JavaScript function to be called on the data item that meets a predefined condition.
Sets the value of the userElementJsFunction property of the instance of a Series class to the name of a JavaScript function.

  e.g.) <Column2DSeries yField="Profit" userElementJsFunction="userElementFunc">
  

The function signature of userElementJsFunction is as follows:

  function_name(seriesId, index, data, values) { ...
Series
 Inherited Type: Object

Sets the vertical axis to which the series refers.
If not set, it refers to the axis set in the verticalAxis property of the chart.

CartesianSeries
 Inherited Type: Boolean

Sets whether to display the series on the chart.

Series
  
xField
Type: String

Sets the field name of the data that determines the X coordinate value (position on the horizontal axis) of the data item.

Bar2DSeries
  
yField
Type: String

Sets the field name of the data that determines the Y coordinate value (position on the vertical axis) of the data item.

Bar2DSeries