From d7aefc7715bba2110b1af1a0b357a91a1377555e Mon Sep 17 00:00:00 2001 From: Kent Huang Date: Tue, 24 Dec 2024 16:00:48 +0800 Subject: [PATCH 1/2] [Fix] DRC-977 Change the order of historgram dataset Signed-off-by: Kent Huang --- js/src/components/charts/HistogramChart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/components/charts/HistogramChart.tsx b/js/src/components/charts/HistogramChart.tsx index 31a91cd2..90f4356d 100644 --- a/js/src/components/charts/HistogramChart.tsx +++ b/js/src/components/charts/HistogramChart.tsx @@ -132,7 +132,7 @@ export function getHistogramChartData( return { labels: newLabels, - datasets: [currentDataset, baseDataset], + datasets: [baseDataset, currentDataset], }; } From ac335561d0ac13eaa2fa41fce07d4f22bb0d11a9 Mon Sep 17 00:00:00 2001 From: Kent Huang Date: Wed, 25 Dec 2024 09:24:29 +0800 Subject: [PATCH 2/2] [Fix] DRC-977 Reverce the ledend order only Signed-off-by: Kent Huang --- js/src/components/charts/HistogramChart.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/src/components/charts/HistogramChart.tsx b/js/src/components/charts/HistogramChart.tsx index 90f4356d..8a5bd299 100644 --- a/js/src/components/charts/HistogramChart.tsx +++ b/js/src/components/charts/HistogramChart.tsx @@ -132,7 +132,7 @@ export function getHistogramChartData( return { labels: newLabels, - datasets: [baseDataset, currentDataset], + datasets: [currentDataset, baseDataset], }; } @@ -148,6 +148,9 @@ export function getHistogramChartOptions( responsive: true, maintainAspectRatio: false, plugins: { + legend: { + reverse: true, + }, title: { display: true, text: title,