diff --git a/public/app/plugins/panel/graph/Legend/LegendSeriesItem.tsx b/public/app/plugins/panel/graph/Legend/LegendSeriesItem.tsx index d8855ce5fdb..2f6f5b3b1b0 100644 --- a/public/app/plugins/panel/graph/Legend/LegendSeriesItem.tsx +++ b/public/app/plugins/panel/graph/Legend/LegendSeriesItem.tsx @@ -71,7 +71,13 @@ export class LegendItem extends PureComponent if (this.props[valueName]) { const valueFormatted = series.formatValue(series.stats[valueName]); legendValueItems.push( - + ); } } @@ -196,13 +202,20 @@ interface LegendValueProps { value: string; valueName: string; asTable?: boolean; + onValueClick?: (event: any) => void; } -function LegendValue(props: LegendValueProps) { - const value = props.value; - const valueName = props.valueName; - if (props.asTable) { - return {value}; +function LegendValue({ value, valueName, asTable, onValueClick }: LegendValueProps) { + if (asTable) { + return ( + + {value} + + ); } - return
{value}
; + return ( +
+ {value} +
+ ); }