From 4450b23a10b0ead44a03c99f2cf6e185babe73c6 Mon Sep 17 00:00:00 2001 From: YANGDB Date: Tue, 30 Apr 2024 17:53:34 -0700 Subject: [PATCH] Fix metrics single data-point visability (#1781) * fix single data-point not showing in metrics analytics Signed-off-by: YANGDB * fix single data-point not showing in metrics analytics Signed-off-by: YANGDB --------- Signed-off-by: YANGDB --- common/constants/shared.ts | 4 ++-- public/components/visualizations/plotly/plot.tsx | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/constants/shared.ts b/common/constants/shared.ts index d9373b4f8b..9126d5eae2 100644 --- a/common/constants/shared.ts +++ b/common/constants/shared.ts @@ -216,11 +216,11 @@ export interface DefaultChartStylesProps { } export const DEFAULT_CHART_STYLES: DefaultChartStylesProps = { - DefaultModeLine: 'lines', + DefaultModeLine: 'lines+markers', Interpolation: 'spline', LineWidth: 0, FillOpacity: 100, - MarkerSize: 5, + MarkerSize: 25, ShowLegend: 'show', LegendPosition: 'v', LabelAngle: 0, diff --git a/public/components/visualizations/plotly/plot.tsx b/public/components/visualizations/plotly/plot.tsx index 0755f64248..e39f0a3907 100644 --- a/public/components/visualizations/plotly/plot.tsx +++ b/public/components/visualizations/plotly/plot.tsx @@ -54,6 +54,14 @@ export function Plt(props: PltProps) { zeroline: false, rangemode: 'normal', }, + layout: { + annotations: [ + { + showarrow: true, + xanchor: 'right', + }, + ], + }, ...darkLayout, ...props.layout, };