Package com.storedobject.chart
Class Tooltip
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.VisiblePart
com.storedobject.chart.Tooltip
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasData,VisibleProperty
Tooltip to display.
In most cases, default tooltips are good enough. However, you can still create customized tooltips using
these methods: append(String), append(AbstractDataProvider), append(Chart),
newline().
- Author:
- Syam
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd parts of this component to the chart.append(AbstractDataProvider<?> data) Add a data point to the tooltip.Add a data point of a specific chart to the tooltip.Add some text as part of the tooltip.voiddeclareData(Set<AbstractDataProvider<?>> dataSet) Declare the data set owned by thisComponentPartby adding it to theSetprovided.voidEncode the JSON string with the properties of this.final Tooltip.TypegetType()Get the type of this tooltip.newline()Add a new line to the tooltip.voidsetType(Tooltip.Type type) Set the type of this tooltip.voidvalidate()This method is invoked bySOChartto check if the component or part is valid or not.Methods inherited from class com.storedobject.chart.VisiblePart
isVisible, setVisibleMethods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getName, 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, getName, getRenderingIndex, getSerial, setName, setRenderingIndex, setSerialMethods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
Constructor Details
-
Tooltip
public Tooltip()
-
-
Method Details
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classAbstractPart- Parameters:
sb- Encoded JSON string to be appended to this.
-
validate
public void validate()Description copied from interface:ComponentPartThis method is invoked bySOChartto check if the component or part is valid or not.- Specified by:
validatein interfaceComponentPart- Overrides:
validatein classVisiblePart
-
getType
-
setType
Set the type of this tooltip.- Parameters:
type- Type of the tooltip.
-
append
-
newline
-
append
Add a data point to the tooltip.- Parameters:
data- Data point will be taken from this data.- Returns:
- Self reference.
-
append
Add a data point of a specific chart to the tooltip. Mostly, you can useappend(AbstractDataProvider)to add data point but some special charts (such asHeatmapChart) have specialized internal data and data points from such data can be added using this method.- Parameters:
chart- Chart from which data point should be taken.- Returns:
- Self reference.
-
declareData
Description copied from interface:HasDataDeclare the data set owned by thisComponentPartby adding it to theSetprovided.- Specified by:
declareDatain interfaceHasData- Parameters:
dataSet- Set to which all the data owned by thisComponentPartneeds to be added.
-
addParts
Description copied from interface:ComponentAdd parts of this component to the chart. This will be invoked if the component was already added to the chart, and it is about to be rendered.
-