Class Condition
java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.Condition
- All Implemented Interfaces:
Serializable
Under which conditions the rule applies.
- Since:
- 6.0.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetCallback(String _fn_callback) Sets the JavaScript function of thecallbackoption, as the source code of the function.voidsetCallbackFunction(ChartFunction callback) Sets the function of thecallbackoption, declared in aJsDefinitioninterface.voidsetMaxHeight(Number maxHeight) The responsive rule applies if the chart height is less than this.voidsetMaxWidth(Number maxWidth) The responsive rule applies if the chart width is less than this.voidsetMinHeight(Number minHeight) The responsive rule applies if the chart height is greater than this.voidsetMinWidth(Number minWidth) The responsive rule applies if the chart width is greater than this.
-
Constructor Details
-
Condition
public Condition()
-
-
Method Details
-
getCallback
-
setCallback
Sets the JavaScript function of thecallbackoption, as the source code of the function.The browser compiles the function from this string, which a Content Security Policy without
unsafe-evalblocks: in the strict CSP mode, sending a chart configuration that has a function throws aContentSecurityPolicyViolationException.Setting a function this way clears a function set with
setCallbackFunction(ChartFunction), which works without compiling JavaScript in the browser.- Parameters:
_fn_callback- the source code of the JavaScript function
-
getCallbackFunction
- See Also:
-
setCallbackFunction
Sets the function of thecallbackoption, declared in aJsDefinitioninterface. The browser runs the function from the frontend bundle, so it works under a Content Security Policy withoutunsafe-eval.Setting a function this way clears a function set with
setCallback(String).A chart exported to SVG with
SVGGeneratordoes not have the function. Neither does a chart state saved or restored withChartAiController.- Parameters:
callback- the function, ornullto remove it- Since:
- 25.4
-
getMaxHeight
- See Also:
-
setMaxHeight
The responsive rule applies if the chart height is less than this. -
getMaxWidth
- See Also:
-
setMaxWidth
The responsive rule applies if the chart width is less than this. -
getMinHeight
- See Also:
-
setMinHeight
The responsive rule applies if the chart height is greater than this.Defaults to: 0
-
getMinWidth
- See Also:
-
setMinWidth
The responsive rule applies if the chart width is greater than this.Defaults to: 0
-