Show TOC

Smart Micro ChartLocate this document in the navigation structure

The sap.ui.comp.smartmicrochart.SmartMicroChart control is used to create different micro charts based on OData metadata.


The SmartMicroChart control analyses the metadata document of an OData service and renders a MicroChart control for a specified entitySet. If no annotations or metadata are provided, the chart will not be rendered.

According to the defined value in the chartType property of the UI.Chart annotation the corresponding MicroChart control is rendered. Currently, the following chart types are supported:

  • Area (sap.ui.comp.smartmicrochart.SmartAreaMicroChart will be created) based on the UI.ChartType Area and Line.

  • Bullet (sap.ui.comp.smartmicrochart.SmartBulletMicroChart will be created) based on UI.ChartType Bullet.

Note In case of a different UI.ChartType is provided than the mentioned above, the control does not render anything. The developer gets informed with a log statement.

The metadata should be annotated with the UI.Chart and the UI.DataPoint terms. Both terms need to annotate one and the same entityType (see also the entitySet property of the SmartMicroChart control in the ).


Both SmartAreaMicroChart and SmartBulletMicroChart control need to handle the properties as follows:

  • DataPoint property of the Chart annotation should point to the DataPoint annotation. Example:

    <Property="DataPoint" AnnotationPath="@UI.DataPoint#BulletChartDataPoint">

    In this example, the BulletChartDataPoint is the qualifier of the DataPoint annotation.

  • Measures and Measure properties

    Measures property of the Chart annotation and Measure property of the MeasureAttributes property of the Chart annotation should point at the same property in the entityType (Revenue in the sample below). Example:

    <EntityType Name="ProductType" sap:label="Product Sales Data" sap:content-version="1">
    					<PropertyRef Name="Product" />
    				<Property Name="Product" Type="Edm.String" />
    				<Property Name="Revenue" Type="Edm.Decimal"/>
    				<Property Name="TargetRevenue" Type="Edm.Decimal"/>
    				<Property Name="ForecastRevenue" Type="Edm.Decimal"/>
    				<Property Name="Criticality" Type="Edm.String"/>
    				<Property Name="Currency" Type="Edm.String"/>
    				<Property Name="ChartTitle" Type="Edm.String"/>
    				<Property Name="ChartDescription" Type="Edm.String"/>
    <Annotations Target="BmcNamespace.ProductType" xmlns="">
    				<Annotation Term="UI.Chart">
    						<PropertyValue EnumMember="UI.ChartType/Bullet"
    							Property="ChartType" />
    						<PropertyValue Property="Title" Path="ChartTitle" />
    						<PropertyValue Property="Description" Path="ChartDescription" />
    						<PropertyValue Property="Measures">
    						<PropertyValue Property="MeasureAttributes">
    								<Record Type="UI.ChartMeasureAttributeType">
    									<PropertyValue Property="Measure" PropertyPath="Revenue" />
    									<PropertyValue Property="Role" EnumMember="UI.ChartMeasureRoleType/Axis1" />
    									<PropertyValue Property="DataPoint" AnnotationPath="@UI.DataPoint#BulletChartDataPoint" />
    				<Annotation Term="UI.DataPoint" Qualifier="BulletChartDataPoint">
    						<PropertyValue String="Product" Property="Title" />
    						<PropertyValue Path="Revenue" Property="Value" />
    						<PropertyValue Path="TargetRevenue" Property="TargetValue" />
    						<PropertyValue Path="ForecastRevenue" Property="ForecastValue" />
    						<PropertyValue Decimal="0" Property="MinimumValue" />
    						<PropertyValue Decimal="200" Property="MaximumValue" />
    						<PropertyValue Path="Criticality" Property="Criticality" />
    Note The same entityType property should be used as a path for the Value property of the DataPoint annotation.