Skip to content

Commit

Permalink
reversed order of data points in line chart
Browse files Browse the repository at this point in the history
  • Loading branch information
hpitino11 committed Jul 23, 2024
1 parent c548837 commit 676c906
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/components/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,11 @@ const CartTable = ({ cartItems, handleDeleteClick }) => {

const ProfessorDetails = ({ professor, analysisData }) => {
const lineData = {
labels: analysisData ? analysisData.averageRatingValues.map(item => `${item.month} ${item.year}`) : [],
labels: analysisData ? analysisData.averageRatingValues.map(item => `${item.month} ${item.year}`).reverse() : [],
datasets: [
{
label: 'Rating Over Time',
data: analysisData ? analysisData.averageRatingValues.map(item => item.value) : [],
data: analysisData ? analysisData.averageRatingValues.map(item => item.value).reverse() : [],
fill: false,
backgroundColor: 'rgb(75, 192, 192)',
borderColor: 'rgba(75, 192, 192, 0.2)',
Expand Down

0 comments on commit 676c906

Please sign in to comment.