From 3f2bc457631e3f56e66ddd34aa1a87b410fea331 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 1 May 2024 00:53:50 +0000 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 (cherry picked from commit 4450b23a10b0ead44a03c99f2cf6e185babe73c6) Signed-off-by: github-actions[bot] --- 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 b30435eb3c..381b7b8a25 100644 --- a/common/constants/shared.ts +++ b/common/constants/shared.ts @@ -214,11 +214,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, };