Skip to content

Commit

Permalink
Merge pull request #25 from lnls-sirius/dev
Browse files Browse the repository at this point in the history
Improve performance
  • Loading branch information
RafaelLyra8 authored Sep 4, 2023
2 parents ae69dd7 + 106ca82 commit 0e521ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 10 additions & 3 deletions front_end/src/components/ArchiverChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ class ArchiverChart extends Component<ArchChartInterface, DetListInterface>{
animation: false,
responsive: true,
normalized: true,
spanGaps: true,
maintainAspectRatio: false,
layout: {
padding: {
Expand All @@ -295,7 +296,10 @@ class ArchiverChart extends Component<ArchChartInterface, DetListInterface>{
radius: 0
},
line: {
tension: 0.1
tension: 0.1,
stepped: 0,
borderDash: [],
width: 1
}
},
hover: {
Expand Down Expand Up @@ -378,9 +382,12 @@ class ArchiverChart extends Component<ArchChartInterface, DetListInterface>{
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);
}
}
}
Expand Down

0 comments on commit 0e521ce

Please sign in to comment.