Skip to content

Commit

Permalink
New design
Browse files Browse the repository at this point in the history
  • Loading branch information
pierromond committed Nov 21, 2023
1 parent 71dba36 commit 43af6ff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/client/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"variable.acoustic_trafic": "Trafic",
"variable.acoustic_soundlevel": "Sound level",
"variable.eventful": "Eventful",
"variable.calm": "Calm",
"variable.uneventful": "Uneventful",
"variable.pleasant": "Pleasant",
"variable.unpleasant": "Unpleasant",
"time.selector.monthsLabels":"Month",
Expand Down
7 changes: 4 additions & 3 deletions packages/client/src/components/AcousticCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ interface AcousticCircleProps {
max: number;
value?: number;
}
//<div>{label}</div>
// <div>{!isNil(value) ? value.toFixed(0) +"/" + max.toFixed(0) : "?"}</div>
export const AcousticCircle: FC<AcousticCircleProps> = ({ icon, color, label, max, value }) => {
const t = useT();
const percent = value ? (value / max) * 100 : 0;
Expand All @@ -23,13 +25,12 @@ export const AcousticCircle: FC<AcousticCircleProps> = ({ icon, color, label, ma
style={{
backgroundImage: `linear-gradient(0deg, ${color} 0%, ${color} ${percent}%, rgba(255,255,255,0) ${percent}%)`,
}}
title={`${label} : ${value || t("no data")}`}
title={`${label} : ${ percent.toFixed(0) +"%" || t("no data")}`}
>
{icon ? icon({ className: "icon", size: "2em" }) : null}
</div>
<label className="d-flex flex-column ms-1">
<div>{label}</div>
<div>{!isNil(value) ? value.toFixed(2) : "?"}</div>

</label>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/components/EmotionScatterPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const EmotionScatterPlot: FC<EmotionScatterPlotProps> = ({ value, pleasan
<ColorAxis {...evenfulAxis} />
</div>
</div>
<label>{t("variable.calm")}</label>
<label>{t("variable.uneventful")}</label>
</div>
<label className="max-x-label">{t("variable.pleasant")}</label>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const AcousticFeatureCircles: FC<{ feature: Feature; currentTimeKey?: str

return (
<div className="acoustic-panel">
<h6>{t("Perceiced Sound Sources")}</h6>
<h6>{t("Perceiced Presence Time")}</h6>
<div className="acoustic-circles">
{circlesData.map((data, index) => (
<AcousticCircle key={index} {...data} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ export const EmotionFeatureScatterPlot: FC<EmotionFeatureScatterPlotProps> = ({
}
return data;
}, [feature, currentTimeKey]);

//<h6>{t("Emotions plot")}</h6>
return (
<>
{value.eventful !== undefined && value.pleasant !== undefined && (
<div>
<h6>{t("Emotions plot")}</h6>
<h6>{t("Emotions plot")}</h6>
<EmotionScatterPlot
evenfulAxis={{
arrow: true,
Expand Down

0 comments on commit 43af6ff

Please sign in to comment.