Interface HasSymbols<T>
- Type Parameters:
T
- origin class type
- All Known Implementing Classes:
EffectScatterSeries
,LineSeries
,MarkLine.Point
,MarkPoint
,MarkPoint.Point
,RadarSeries
,ScatterSeries
public interface HasSymbols<T>
A component that has symbols.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
A symbol that can be defined by a predefined type or icon.static enum
Predefined symbol types. -
Method Summary
Modifier and TypeMethodDescriptionString[]
void
setSymbol
(HasSymbols.SymbolType symbolType) Sets predefined symbol type or replaces an existing one.void
Sets a symbol or replaces an existing one.
Possible values:image://%url%
, example:image://http://example.website/a/b.png
image://%dataURI%
, example:image://data:image/gif;base64,...
path://%svgPathData%
, example:path://M30.9,53.2c16...
void
setSymbolKeepAspect
(Boolean symbolKeepAspect) Sets the keeping of aspects for a symbol.void
setSymbolOffset
(String xOffset, String yOffset) Sets an offset of symbol relative to original position or replaces an existing one.
Possible values: Pixel values:hasSymbols.setSymbolOffset("10", "10");
.void
setSymbolRotate
(Integer symbolRotate) Sets a rotate degree of symbol or replaces an existing one.void
setSymbolSize
(Integer symbolSize) Sets a symbol size or replaces an existing one.void
setSymbolSizeFunction
(JsFunction symbolSizeFunction) Sets a callback function for symbol size or replaces an existing one.void
setSymbolSizeFunction
(String symbolSizeFunction) Sets a callback function for symbol size as string or replaces an existing one.default T
withSymbol
(HasSymbols.SymbolType symbolType) default T
withSymbol
(String icon) default T
withSymbolKeepAspect
(Boolean symbolKeepAspect) default T
withSymbolOffset
(String xOffset, String yOffset) default T
withSymbolRotate
(Integer symbolRotate) default T
withSymbolSize
(Integer symbolSize) default T
withSymbolSizeFunction
(JsFunction symbolSizeFunction) default T
withSymbolSizeFunction
(String symbolSizeFunction)
-
Method Details
-
getSymbol
HasSymbols.Symbol getSymbol()- Returns:
- symbol
-
setSymbol
Sets a symbol or replaces an existing one.
Possible values:-
image://%url%
, example:image://http://example.website/a/b.png
-
image://%dataURI%
, example:image://data:image/gif;base64,...
-
path://%svgPathData%
, example:path://M30.9,53.2c16...
- Parameters:
icon
- symbol to set
-
-
withSymbol
- Parameters:
icon
- symbol to set- Returns:
- this
- See Also:
-
getSymbolSize
Integer getSymbolSize()- Returns:
- symbol size
-
setSymbolSize
Sets a symbol size or replaces an existing one.- Parameters:
symbolSize
- symbol size to set
-
getSymbolSizeFunction
JsFunction getSymbolSizeFunction()- Returns:
- callback function for symbol size
-
setSymbolSizeFunction
Sets a callback function for symbol size as string or replaces an existing one.- Parameters:
symbolSizeFunction
- formatter function as string
-
withSymbolSizeFunction
- Parameters:
symbolSizeFunction
- symbol size callback function as string- Returns:
- this
- See Also:
-
withSymbolSize
- Parameters:
symbolSize
- symbol size to set- Returns:
- this
- See Also:
-
getSymbolRotate
Integer getSymbolRotate()- Returns:
- rotate degree of symbol
-
setSymbolRotate
Sets a rotate degree of symbol or replaces an existing one. The negative value represents clockwise.- Parameters:
symbolRotate
- rotate symbol to set
-
withSymbolRotate
- Parameters:
symbolRotate
- rotate symbol to set- Returns:
- this
- See Also:
-
getSymbolKeepAspect
Boolean getSymbolKeepAspect()- Returns:
true
if the aspect for symbols must be kept,false
otherwise
-
setSymbolKeepAspect
Sets the keeping of aspects for a symbol.- Parameters:
symbolKeepAspect
- whether to keep aspect for symbols in the form ofpath://%svgPathData%
-
withSymbolKeepAspect
- Parameters:
symbolKeepAspect
- whether to keep aspect for symbols in the form ofpath://%svgPathData%
- Returns:
- this
- See Also:
-
getSymbolOffset
String[] getSymbolOffset()- Returns:
- offset of symbol relative to original position
-
setSymbolOffset
Sets an offset of symbol relative to original position or replaces an existing one.
Possible values:-
Pixel values:
hasSymbols.setSymbolOffset("10", "10");
. -
Percentage values:
hasSymbols.setSymbolOffset("50%", "45%");
. -
Pixel and percentage values combination:
hasSymbols.setSymbolOffset("5", "50%");
.
- Parameters:
xOffset
- horizontal offsetyOffset
- vertical offset
-
Pixel values:
-
withSymbolOffset
- Parameters:
xOffset
- horizontal offsetyOffset
- vertical offset- Returns:
- this
- See Also:
-