import React from 'react' ; import { EuiEmptyPrompt , EuiText } from '@elastic/eui' ; import { i18n } from '@kbn/i18n' ; export const VisualizationNoResults = ( { hasNegativeValues = false } ) => { return ( < EuiEmptyPrompt iconType = "visualizeApp" iconColor = "default" data - test - subj = "pieVisualizationError" body = { < EuiText size = "xs" > { hasNegativeValues ? i18n . translate ( 'expressionPie.negativeValuesFound' , { defaultMessage : "Pie/donut charts can't render with negative values." , } ) : i18n . translate ( 'expressionPie.noResultsFoundTitle' , { defaultMessage : 'No results found' , } ) } < /EuiText>}/ > ) ; } ;