mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
GraphNG: improve behavior when switching between solid/dash/dots (#30796)
This commit is contained in:
parent
896d3328b6
commit
fcac59107c
@ -73,9 +73,16 @@ export const LineStyleEditor: React.FC<FieldOverrideEditorProps<LineStyle, any>>
|
|||||||
value={value?.fill || 'solid'}
|
value={value?.fill || 'solid'}
|
||||||
options={lineFillOptions}
|
options={lineFillOptions}
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
|
let dash: number[] | undefined = undefined;
|
||||||
|
if (v === 'dot') {
|
||||||
|
dash = parseText(dotOptions[0].value!);
|
||||||
|
} else if (v === 'dash') {
|
||||||
|
dash = parseText(dashOptions[0].value!);
|
||||||
|
}
|
||||||
onChange({
|
onChange({
|
||||||
...value,
|
...value,
|
||||||
fill: v!,
|
fill: v!,
|
||||||
|
dash,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user