SAP-samples / fiori-elements-feature-showcase

Sample application that demonstrates and documents a broad variety of features of SAP Fiori elements for OData V4. Developers can play around with the new features and learn how to implement them.
https://community.sap.com/topics/fiori-elements
Apache License 2.0
198 stars 70 forks source link

Autoscaling in Fiori Charts #27

Closed PranavBPatil closed 5 months ago

PranavBPatil commented 5 months ago

We were working on an application with CAP as backend and FIORI as UI. While trying to create an analytical app, we encountered that the Y axis was not appropriately scaling as per the Measure values (The Y axis shows 0 to 100 scale even though the minimum value of measure is 70 and maximum value of measure is 110). We have tried using some annotations for autoscaling or fixed scaling as below, but the issue still persists. We couldn't find any solution. Kindly let us know how the Y axis scaling is taken care in the Smart Chart SAPUI5 element.

Following annotations were tried: AxisScaling : { $Type : 'UI.ChartAxisScalingType', ScaleBehavior : #AutoScale, AutoScaleBehavior : { $Type : 'UI.ChartAxisAutoScaleBehaviorType', ZeroAlwaysVisible: false } }

Or AxisScaling : { $Type : 'UI.ChartAxisScalingType', ScaleBehavior : #FixedScale } with datapoints assigned to Measures as below: UI.DataPoint #DataPointQualifier : { $Type : 'UI.DataPointType', Value: price, MinimumValue : 70, MaximumValue : 115, ValueFormat : { $Type : 'UI.NumberFormat', ScaleFactor : 100, NumberOfFractionalDigits : 2 } }

schiwekM commented 5 months ago

Hi,

I checked with a colleague and if your question is regarding SmartCharts than yes it is supported. For V4 charts it is not yet supported and please raise a request through the appropriate channels if needed.

Thanks & BR, Marten