refactor: update nutrition chart colors and enhance layout
- Changed color codes for macro nutrients in the nutrition interpretation and metrics files to improve visual consistency. - Added new CSS styles for uniform chart height and layout adjustments in the frontend components, enhancing the overall user experience. - Refactored the NutritionCharts component to utilize the new macro chart theme for better maintainability and readability.
This commit is contained in:
1 parent
b96b1931db
commit
31fbf33031
7 files changed
+131
-59
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
ResponsiveContainer, CartesianGrid, Legend, ReferenceLine, ScatterChart, Scatter
|
||||
} from 'recharts'
|
||||
import { api as nutritionApi } from '../utils/api'
|
||||
import { MACRO_CHART } from '../utils/macroChartTheme'
|
||||
import dayjs from 'dayjs'
|
||||
import isoWeek from 'dayjs/plugin/isoWeek'
|
||||
dayjs.extend(isoWeek)
|
||||
@@ -709,9 +710,9 @@ function WeeklyMacros({ weekly }) {
|
||||
<Tooltip contentStyle={{background:'var(--surface)',border:'1px solid var(--border)',borderRadius:8,fontSize:11}}
|
||||
formatter={(v,n)=>[`${Math.round(v)} g`, n]}/>
|
||||
<Legend wrapperStyle={{fontSize:11}}/>
|
||||
<Bar dataKey="Protein" stackId="a" fill="#1D9E75"/>
|
||||
<Bar dataKey="Fett" stackId="a" fill="#378ADD"/>
|
||||
<Bar dataKey="Kohlenhydrate" stackId="a" fill="#D4537E" radius={[3,3,0,0]}/>
|
||||
<Bar dataKey="Protein" stackId="a" fill={MACRO_CHART.protein}/>
|
||||
<Bar dataKey="Fett" stackId="a" fill={MACRO_CHART.fat}/>
|
||||
<Bar dataKey="Kohlenhydrate" stackId="a" fill={MACRO_CHART.carbs} radius={[3,3,0,0]}/>
|
||||
</BarChart>
|
||||
</ResponsiveContainer>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user