sap.viz.ui5.controls.VizFrame: Clicking a data point in Line Chart triggers console error
What is the issue and how can we reproduce it?
Reproduction
Open the sample: https://ui5.sap.com/#/entity/sap.viz.ui5.controls.VizFrame/sample/sap.viz.sample.CustomPopover/code Change the chart type from Bar Chart to Line Chart. Open the browser developer console. Click any data point in the line chart.
Actual Behavior
Every click on a data point logs the following error in the console: sap.ui.core.theming.Parameters: The following parameters could not be found: "#168eff" -
Expected Behavior
Clicking a data point should not produce any console errors or warnings.
Which OpenUI5 version is your project targeting?
1.139.0, 1.148.7, 1.154.0
Is the issue device- or browser-specific?
No response
Confirmation
- [x] I have searched the existing issues and reviewed the relevant documentation as well as the API reference.
- [x] I am not disclosing any internal or sensitive information.
The sap.viz.ui5.controls.chartpopover.ShapeMarker class unconditionally calls the Parameters.get API with the value of its color property, even when that value already is a CSS color, not a parameter name.
Hint for the owners of ShapeMarker:
One way to address this, could be to check the value first against DataType.getType("sap.ui.core.CSSColor").isValid(color.trim()) and call Parameters.get only when the check returns false.
See CSSColor.
Hello @mengmeng0813, Thank you for sharing this finding. I've created an internal incident DINC1129405. The status of the issue will be updated here in GitHub. Kind regards