Package com.storedobject.chart
Class MarkArea.Block
java.lang.Object
com.storedobject.chart.MarkArea.Block
- All Implemented Interfaces:
ComponentProperty
- Enclosing class:
MarkArea
A block represents an area of the
MarkArea. A block has 2 MarkArea.Block.Sides viz. "the starting side",
"the ending side".
A block may be defined along an axis and in that case, it covers an area along that axis with the starting side and ending side based on the starting value and ending value along that axis.
A block may be defined using both the axes (mostly in the case of RectangularCoordinate and in that
case, it will have to be specified using 2 values for each axis. The block will be formed from the
intersection of the axis values.
There are a few special strings that can be used when specifying the values and when such values are used, it is treated as special cases. The following special strings are currently supported:
"min": Represents minimum value of the axis
"max": Represents maximum value of the axis
"average": The average value when the chart's values (applicable for numeric data)
- Author:
- Syam
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA block has 2 sides, the starting side and an ending side. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.final MarkArea.Block.SideGet the ending side.final ItemStylegetItemStyle(boolean create) Get item style for this block.final StringgetName()Get the name of the block.final MarkArea.Block.SideGet the starting side.voidsetItemStyle(ItemStyle itemStyle) Set item style.voidSet the name of the block.voidHelper method to set sides.voidsetSides(XAxis xAxis, YAxis yAxis, Object xValueFrom, Object yValueFrom, Object xValueTo, Object yValueTo) Helper method to set sides.
-
Constructor Details
-
Block
public Block()
-
-
Method Details
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Parameters:
sb- Encoded JSON string to be appended to this.
-
getName
-
setName
-
getStartingSide
-
getEndingSide
-
setSides
Helper method to set sides. A value may be defined as a reserved string that has special meaning. The currently supported reserved strings are: "min", "max", "average". -
setSides
public void setSides(XAxis xAxis, YAxis yAxis, Object xValueFrom, Object yValueFrom, Object xValueTo, Object yValueTo) Helper method to set sides. A value may be defined as a reserved string that has special meaning. The currently supported reserved strings are: "min", "max", "average".- Parameters:
xAxis- X axis.yAxis- Y axis.xValueFrom- X value from. Value should match with theDataTypeof the chart or one of the reserved strings.yValueFrom- Y value from. Value should match with theDataTypeof the chart's axis or one of the reserved strings.xValueTo- X value to. Value should match with theDataTypeof the chart's axis or one of the reserved strings.yValueTo- Y value to. Value should match with theDataTypeof the chart's axis or one of the reserved strings.
-
getItemStyle
Get item style for this block. (Each block can have its own item style).- Parameters:
create- If passed true, a new style is created if not exists.- Returns:
- Item style.
-
setItemStyle
Set item style. (Each block can have its own item style).- Parameters:
itemStyle- Style to set.
-