From 795933f761a0b4aa6f116e74d6f4d4749df4e362 Mon Sep 17 00:00:00 2001 From: Rafael Lyra Date: Mon, 4 Sep 2023 10:17:46 -0300 Subject: [PATCH 1/2] Update version --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8a4c5ad..011ac1c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: frontend: container_name: 'rad-det' - image: 'ghcr.io/lnls-sirius/rad-det-frontend:1.2.4' + image: 'ghcr.io/lnls-sirius/rad-det-frontend:1.2.5' build: context: ./front_end ports: From 106ca8277bdff318c09f1cf18756e4017d5d4fa3 Mon Sep 17 00:00:00 2001 From: Rafael Lyra Date: Mon, 4 Sep 2023 10:18:18 -0300 Subject: [PATCH 2/2] Improve chart responsivity --- front_end/src/components/ArchiverChart/index.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/front_end/src/components/ArchiverChart/index.tsx b/front_end/src/components/ArchiverChart/index.tsx index 125505e..3ce0585 100644 --- a/front_end/src/components/ArchiverChart/index.tsx +++ b/front_end/src/components/ArchiverChart/index.tsx @@ -284,6 +284,7 @@ class ArchiverChart extends Component{ animation: false, responsive: true, normalized: true, + spanGaps: true, maintainAspectRatio: false, layout: { padding: { @@ -295,7 +296,10 @@ class ArchiverChart extends Component{ radius: 0 }, line: { - tension: 0.1 + tension: 0.1, + stepped: 0, + borderDash: [], + width: 1 } }, hover: { @@ -378,9 +382,12 @@ class ArchiverChart extends Component{ x: pvInfo.date, y: pvInfo.value }); - while(this.datasetsChart[pvname][0].x < this.date_interval[0]){ - this.datasetsChart[pvname].shift(); + + let rem_id = 0; + while(this.datasetsChart[pvname][rem_id].x < this.date_interval[0]){ + rem_id += 1; } + this.datasetsChart[pvname] = this.datasetsChart[pvname].slice(rem_id); } } }