From fcac59107c2d16f4361989daffdfe163595e8b82 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Mon, 1 Feb 2021 10:05:31 -0800 Subject: [PATCH] GraphNG: improve behavior when switching between solid/dash/dots (#30796) --- public/app/plugins/panel/timeseries/LineStyleEditor.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/app/plugins/panel/timeseries/LineStyleEditor.tsx b/public/app/plugins/panel/timeseries/LineStyleEditor.tsx index d797c432ed6..93d2536228e 100644 --- a/public/app/plugins/panel/timeseries/LineStyleEditor.tsx +++ b/public/app/plugins/panel/timeseries/LineStyleEditor.tsx @@ -73,9 +73,16 @@ export const LineStyleEditor: React.FC> value={value?.fill || 'solid'} options={lineFillOptions} 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({ ...value, fill: v!, + dash, }); }} />