import { Position } from '@elastic/charts' ; import { i18n } from '@kbn/i18n' ; import type { ExpressionFunctionDefinition } from '../../../../expressions/common' ; import { EXPRESSION_HEATMAP_LEGEND_NAME } from '../constants' ; import { HeatmapLegendConfig , HeatmapLegendConfigResult } from '../types' ; export const heatmapLegendConfig = { name : EXPRESSION_HEATMAP_LEGEND_NAME , aliases : [ ] , type : EXPRESSION_HEATMAP_LEGEND_NAME , help : `Configure the heatmap chart's legend` , inputTypes : [ 'null' ] , args : { isVisible : { types : [ 'boolean' ] , help : i18n . translate ( 'expressionHeatmap.function.args.legend.isVisible.help' , { defaultMessage : 'Specifies whether or not the legend is visible.' , } ) , } , position : { types : [ 'string' ] , options : [ Position . Top , Position . Right , Position . Bottom , Position . Left ] , help : i18n . translate ( 'expressionHeatmap.function.args.legend.position.help' , { defaultMessage : 'Specifies the legend position.' , } ) , } , maxLines : { types : [ 'number' ] , help : i18n . translate ( 'expressionHeatmap.function.args.legend.maxLines.help' , { defaultMessage : 'Specifies the number of lines per legend item.' , } ) , } , shouldTruncate : { types : [ 'boolean' ] , default : true , help : i18n . translate ( 'expressionHeatmap.function.args.legend.shouldTruncate.help' , { defaultMessage : 'Specifies whether or not the legend items should be truncated.' , } ) , } , } , fn ( input , args ) { return { type : EXPRESSION_HEATMAP_LEGEND_NAME , ... args , } ; } , } ;