<core:FragmentDefinition xmlns="sap.suite.ui.microchart"
	xmlns:core="sap.ui.core"
	xmlns:m="sap.m"
	xmlns:oDataV4MicroChart="sap.fe.macros.microchart"
	xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1" template:require="{
		MODEL: 'sap/ui/model/odata/v4/AnnotationHelper',
		MICROCHART: 'sap/fe/macros/microchart/MicroChartHelper',
		ID: 'sap/fe/macros/StableIdHelper'
	}">
	<template:with path="chartAnnotation>Measures/0" helper="MICROCHART.getMeasureAttributeForMeasure" var="MeasureAttribute">
		<template:with path="MeasureAttribute>DataPoint/$AnnotationPath/" var="DataPoint">
			<template:if test="{DataPoint>Value} &amp;&amp; MICROCHART.isNotAlwaysHidden('Stacked Bar', ${DataPoint>Value}, undefined, ${DataPoint>Value/$Path@com.sap.vocabularies.UI.v1.Hidden})">
				<template:then>
					<template:with path="DataPoint>Value/$Path" helper="MODEL.resolve$Path" var="Measure">
						<oDataV4MicroChart:MicroChartContainer
							id="{= ${this>id} ? ID.generate([${this>id}, 'mCC']) : undefined }"
							renderLabels="{= ${this>renderLabels} !== 'false' ? true : false }"
							chartTitle="{= ${this>title} || ${chartAnnotation>Title}}"
							chartDescription="{= ${this>description} || ${chartAnnotation>Description}}"
							dataPointQualifiers="{= ${DataPoint>./@sapui.name}.indexOf('com.sap.vocabularies.UI.v1.DataPoint') === -1 ? undefined : (${DataPoint>./@sapui.name}.indexOf('#') > -1 ? ${DataPoint>./@sapui.name}.split('#')[1] : '') }"
							binding="{= ${this>groupId} ? ('{path:\'\', parameters : { $$groupId: \'' + ${this>groupId} + '\'} }') : undefined }">
							<StackedBarMicroChart bars="{= '{path:\'' + (${collection>$kind} === 'EntitySet' ? '/' : '') + ${collection>@sapui.name} + '\', parameters : { ' + MICROCHART.getSelectParameters('','', (${DataPoint>Criticality} ? ${DataPoint>Criticality/$Path} : ''), ((${Measure>@Org.OData.Measures.V1.ISOCurrency} || ${Measure>@Org.OData.Measures.V1.Unit}) ? (${Measure>@Org.OData.Measures.V1.ISOCurrency/$Path} || ${Measure>@Org.OData.Measures.V1.Unit/$Path}) : ''), ${chartAnnotation>Dimensions@@MICROCHART.getMeasureOrDimensionPropertyPaths}) + '} }' }">
								<bars>
									<StackedBarMicroChartBar value="{DataPoint>Value@@.MODEL.value}" displayValue="{= ${DataPoint>Value/$Path@com.sap.vocabularies.Common.v1.Text} ? ${DataPoint>Value/$Path@com.sap.vocabularies.Common.v1.Text@@.MODEL.value} : undefined }" valueColor="{= ${DataPoint>Criticality} ? MICROCHART.getCriticalityBinding(${DataPoint>}) : undefined }">
									</StackedBarMicroChartBar>
								</bars>
							</StackedBarMicroChart>
						</oDataV4MicroChart:MicroChartContainer>
					</template:with>
				</template:then>
				<template:elseif test="{= MICROCHART.logWarning('StackedBar', { DataPoint_Value : ${DataPoint>Value} }) }">
				</template:elseif>
			</template:if>
		</template:with>
	</template:with>

</core:FragmentDefinition>