mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Timeseries: Limit long text in legend (#66307)
This commit is contained in:
parent
ae23ef5b41
commit
7e270021a8
@ -74,6 +74,7 @@ export const VizLegendListItem = <T = unknown,>({
|
|||||||
<button
|
<button
|
||||||
disabled={readonly}
|
disabled={readonly}
|
||||||
type="button"
|
type="button"
|
||||||
|
title={item.label}
|
||||||
onBlur={onMouseOut}
|
onBlur={onMouseOut}
|
||||||
onFocus={onMouseOver}
|
onFocus={onMouseOver}
|
||||||
onMouseOver={onMouseOver}
|
onMouseOver={onMouseOver}
|
||||||
@ -100,6 +101,9 @@ const getStyles = (theme: GrafanaTheme2) => ({
|
|||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
user-select: text;
|
user-select: text;
|
||||||
|
max-width: 600px;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
`,
|
`,
|
||||||
itemDisabled: css`
|
itemDisabled: css`
|
||||||
label: LegendLabelDisabled;
|
label: LegendLabelDisabled;
|
||||||
|
@ -73,6 +73,7 @@ export const LegendTableItem = ({
|
|||||||
<button
|
<button
|
||||||
disabled={readonly}
|
disabled={readonly}
|
||||||
type="button"
|
type="button"
|
||||||
|
title={item.label}
|
||||||
onBlur={onMouseOut}
|
onBlur={onMouseOut}
|
||||||
onFocus={onMouseOver}
|
onFocus={onMouseOver}
|
||||||
onMouseOver={onMouseOver}
|
onMouseOver={onMouseOver}
|
||||||
@ -122,6 +123,9 @@ const getStyles = (theme: GrafanaTheme2) => {
|
|||||||
border: none;
|
border: none;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
max-width: 600px;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
`,
|
`,
|
||||||
labelDisabled: css`
|
labelDisabled: css`
|
||||||
label: LegendLabelDisabled;
|
label: LegendLabelDisabled;
|
||||||
|
Loading…
Reference in New Issue
Block a user