The sap.ui.comp.smartmicrochart.SmartAreaMicroChart control creates a sap.suite.ui.microchart.AreaMicroChart control based on OData metadata.
The SmartAreaMicroChart control is rendered by using the chartType property Area of the UI.Chart annotation. The entitySet attribute must be specified to use the control. This control property is used to fetch the corresponding annotations. Based on this, the AreaMicroChart is rendered; it can also be used to fetch the actual chart data.
For more information, see the API Reference and the Sample.
This control can also be used directly (without creating a
SmartMicroChartcontrol).
Binding
The SmartAreaMicroChart control only supports enableAutoBinding = true. This means it is bound to a single entitySet, and gets a navigation property as a chartBindingPath to an entitySet (for the relative binding). Otherwise, the entitySet property is used for absolute binding.
Colors of the Chart (Criticality)
The color of the chart is defined based on the thresholds by using the CriticalityCalculation and the ImprovementDirection property of the UI.DataPoint annotation.
Setting the color directly using the
Criticalityproperty of the UI.DataPoint annotation is not supported bySmartAreaMicroChart.
The following directions are supported:
Target-oriented:
Minimize-oriented:
Maximize-oriented:
For more information, see the Sample.
Labels, Formatting and Label Colors of the Chart
The control provides labels that are displayed at the top and bottom of the chart. You can control the labels themselves, as well as the color of the labels, by using annotations:
- Labels of the Chart
- Formatting
- Label Colors of the Chart (criticality)
Title, Description and UnitOfMeasure
The control provides the Title, Description or UnitOfMeasure values retrieved from the annotations. If needed, the application can create a corresponding chartTitle, chartDescription or unitOfMeasure (of type sap.m.Label) association. The information is then read from the annotation document and it is set as the text property of the sap.m.Label.
-
Title and Description
For the Title and Description properties of the Chart annotation both
StringandPathare supported:<PropertyValue Property="Title" Path="ChartTitle" /><PropertyValue Property="Title" String="ChartTitle" />
Only the Title and Description properties of the Chart annotation are taken into account (not these of the DataPoint annotation).
For the
SmartAreaMicroChartcontrol, the Title, Description and UnitOfMeasure have the same binding context as the chart itself (eitherchartBindingPathorentitySet). -
UnitOfMeasure
For more information about the supported annotation terms ISOCurrency and Unit, see http://docs.oasis-open.org/odata/odata/v4.0/os/vocabularies/Org.OData.Measures.V1.xml.
The control takes into account only the measure annotation for the
entityTypeproperty that is addressed by theValueproperty of the DataPoint annotation. In the following example, theValueproperty of the DataPoint points to thePriceproperty in theEntityType(Path="Price"). This means that the control (Path="Currency") uses the measure annotation withTarget="AmcNamespace.StockPrice/Price":<EntityType Name="StockPrice"> .... <Property Name="Currency" Type="Edm.String" /> </EntityType> <Annotation Term="UI.DataPoint" Qualifier="AreaChartDataPoint"> <PropertyValue Property="Value" Path="Price" /> </Annotation>
<Annotations xmlns="http://docs.oasis-open.org/odata/ns/edm" Target="AmcNamespace.StockPrice/Price" > <Annotation Term="MEASURES.ISOCurrency" Path="Currency"> </Annotation> </Annotations>


