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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA symbol that can be defined by a predefined type or icon.static enumPredefined symbol types. -
Method Summary
Modifier and TypeMethodDescriptionString[]voidsetSymbol(HasSymbols.SymbolType symbolType) Sets predefined symbol type or replaces an existing one.voidSets a symbol or replaces an existing one.
Possible values:image://%url%, example:image://http://example.website/a/b.pngimage://%dataURI%, example:image://data:image/gif;base64,...path://%svgPathData%, example:path://M30.9,53.2c16...voidsetSymbolKeepAspect(Boolean symbolKeepAspect) Sets the keeping of aspects for a symbol.voidsetSymbolOffset(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");.voidsetSymbolRotate(Integer symbolRotate) Sets a rotate degree of symbol or replaces an existing one.voidsetSymbolSize(Integer symbolSize) Sets a symbol size or replaces an existing one.voidsetSymbolSizeFunction(JsFunction symbolSizeFunction) Sets a callback function for symbol size or replaces an existing one.voidsetSymbolSizeFunction(String symbolSizeFunction) Sets a callback function for symbol size as string or replaces an existing one.default TwithSymbol(HasSymbols.SymbolType symbolType) default TwithSymbol(String icon) default TwithSymbolKeepAspect(Boolean symbolKeepAspect) default TwithSymbolOffset(String xOffset, String yOffset) default TwithSymbolRotate(Integer symbolRotate) default TwithSymbolSize(Integer symbolSize) default TwithSymbolSizeFunction(JsFunction symbolSizeFunction) default TwithSymbolSizeFunction(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:
trueif the aspect for symbols must be kept,falseotherwise
-
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:
-