Package com.storedobject.chart
Class FunnelChart
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.Chart
com.storedobject.chart.AbstractChart
com.storedobject.chart.SelfPositioningChart
com.storedobject.chart.FunnelChart
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasAnimation,HasData,HasEmphasis,HasPosition
Funnel chart.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Chart
Chart.Emphasis, Chart.Label, Chart.LabelPosition -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.FunnelChart(AbstractDataProvider<?> itemNames, DataProvider values) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.voidFit the funnel to the left side.voidFit the funnel to the right side.intGet the gap between slices.booleanSee if the slices are shown inverted or not.booleanisSorted()By default, slices will be sorted and shown.voidsetData(DataProvider data) Set data for the slices.voidsetInverted(boolean inverted) Invert the view of the slices.voidsetItemNames(AbstractDataProvider<?> itemNames) Set names of the slices.voidsetMouthSize(Size mouthSize) Set the mouth size of the funnel.voidsetSliceGap(int sliceGap) Set the gap between slices.voidsetSorted(boolean sorted) Set the "sort" property for the slices.voidsetTailSize(Size size) Set the tail size.voidShow the funnel at the center.Methods inherited from class com.storedobject.chart.SelfPositioningChart
getPosition, setPositionMethods inherited from class com.storedobject.chart.AbstractChart
setData, setData, setType, validateMethods inherited from class com.storedobject.chart.Chart
addParts, dataToEmbed, dataValue, dataValueIndex, declareData, getAnimation, getCoordinateSystem, getData, getEmphasis, getItemStyle, getLabel, getLabelName, getMarkArea, getMax, getMin, getName, getTooltip, getType, mainData, plotOn, plotOn, setAnimation, setColors, setCustomRenderer, setEmphasis, setItemStyle, setLabel, setMarkArea, setName, setTooltip, typeValueMethods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getSerial, getZ, hashCode, hasId, setSerial, setZMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.ComponentPart
className, getId, getRenderingIndex, getSerial, setRenderingIndex, setSerial
-
Constructor Details
-
FunnelChart
public FunnelChart()Constructor. -
FunnelChart
Constructor.- Parameters:
itemNames- Item names of the slices.values- Values of the slices.
-
-
Method Details
-
setItemNames
Set names of the slices.- Parameters:
itemNames- Item names of the slices.
-
setData
-
setTailSize
Set the tail size. (Default value of tail size is zero and thus, the tail will look like a triangle).- Parameters:
size- Size of the tail to set.
-
isSorted
public boolean isSorted()By default, slices will be sorted and shown.- Returns:
- True if sorted, otherwise false.
-
setSorted
public void setSorted(boolean sorted) Set the "sort" property for the slices.- Parameters:
sorted- True for sorted, false for not sorted.
-
isInverted
public boolean isInverted()See if the slices are shown inverted or not.- Returns:
- True if inverted, otherwise false.
-
setInverted
public void setInverted(boolean inverted) Invert the view of the slices. (By default, the slices are sorted in descending order. By setting this totrue, slices will be shown in ascending order).- Parameters:
inverted- True for inverted, false for not inverted.
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classChart- Parameters:
sb- Encoded JSON string to be appended to this.
-
getSliceGap
public int getSliceGap()Get the gap between slices.- Returns:
- Gap.
-
setSliceGap
public void setSliceGap(int sliceGap) Set the gap between slices.- Parameters:
sliceGap- Gap in pixels.
-
setMouthSize
Set the mouth size of the funnel. (By default, the mouth size is 100%).- Parameters:
mouthSize- Mouth size to set.
-
fitOnLeftSide
public void fitOnLeftSide()Fit the funnel to the left side. It will look like fitted on the left wall. -
fitOnRightSide
public void fitOnRightSide()Fit the funnel to the right side. It will look like fitted on the right wall. -
showAtCenter
public void showAtCenter()Show the funnel at the center.
-