Skip to content

Commit

Permalink
Improve chart responsivity
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelLyra8 committed Sep 4, 2023
1 parent 795933f commit 106ca82
Showing 1 changed file with 10 additions and 3 deletions.
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 106ca82

Please sign in to comment.