Skip to content

Latest commit

 

History

History
160 lines (129 loc) · 3.74 KB

File metadata and controls

160 lines (129 loc) · 3.74 KB

Harvey Micro Chart

You can render the micro chart as a Harvey Ball micro chart in SAP Fiori elements for OData V4.

A Harvey Ball micro chart visualizes a single measure value is against a maximum value. For more information about this chart type, see Samples.

The UI.Chart Title property is used for the title. The UI.Chart Description property is used for the subtitle.

Sample Code:

XML Annotation

<Annotation Term="UI.Chart" Qualifier="SpecificationWidthHarveyChart">
    <Record>
        <PropertyValue EnumMember="UI.ChartType/Pie" Property="ChartType" />
        <PropertyValue Property="Title" String="Sold to Produced Harvey Chart" />
        <PropertyValue Property="Description" String="Harvey Chart" />
        <PropertyValue Property="Measures">
            <Collection>
                <PropertyPath>Sold</PropertyPath>
            </Collection>
        </PropertyValue>
        <PropertyValue Property="MeasureAttributes">
            <Collection>
                <Record Type="UI.ChartMeasureAttributeType">
                    <PropertyValue Property="DataPoint" AnnotationPath="@UI.DataPoint" />
                </Record>
            </Collection>
        </PropertyValue>
    </Record>
</Annotation>

Sample Code:

ABAP CDS Annotation


@UI.Chart: [
  {
    title: 'Sold to Produced Harvey Chart',
    description: 'Harvey Chart',
    chartType: #PIE,
    measures: [
      'Sold'
    ],
    measureAttributes: [
      {
        measure: 'Sold',
        role: #AXIS_1,
        asDataPoint: true
      }
    ],
    qualifier: 'SpecificationWidthHarveyChart'
  }
]
annotate view STTA_C_MP_PRODUCT with {

}

Sample Code:

CAP CDS Annotation


UI.Chart #SpecificationWidthHarveyChart : {
    ChartType : #Pie,
    Title : 'Sold to Produced Harvey Chart',
    Description : 'Harvey Chart',
    Measures : [
        Sold
    ],
    MeasureAttributes : [
        {
            $Type : 'UI.ChartMeasureAttributeType',
            Role : #Axis1,
            Measure: Sold,
            DataPoint : '@UI.DataPoint'
        }
    ]
}

Sample Code:

XML Annotation

<Annotation Term="UI.DataPoint">
    <Record>
        <PropertyValue Path="Sold" Property="Value" />
        <PropertyValue Path="Produced" Property="MaximumValue" />
        <PropertyValue Path="criticalityValue" Property="Criticality" />
    </Record>
</Annotation>

Sample Code:

ABAP CDS Annotation


@UI.dataPoint: {
  criticality: 'criticalityValue',
  maximumValue: 20
}
Sold;

Sample Code:

CAP CDS Annotation


UI.DataPoint : {
    Value : Sold,
    MaximumValue : Produced,
    Criticality : criticalityValue
}

For semantic coloring, only the Criticality annotation is supported.

The following annotations are mandatory and must be used in the Harvey micro chart:

  • UI.ChartChartType: "Pie"

  • UI.ChartMeasures

  • UI.ChartMeasureAttributesDataPoint

  • UI.DataPointMaximumValue

  • In case semantic coloring is required, use UI.DataPointCriticality

Note:

For information about SAP Fiori elements for OData V2, see Harvey Micro Chart.