Skip to content

Commit

Permalink
Correction de l'axe des abcisses sur les nouveaux graphes
Browse files Browse the repository at this point in the history
  • Loading branch information
mariheck committed Jan 20, 2025
1 parent 392bcf4 commit b748cda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ const IndicateurChart = ({
titre: title,
unite: variant !== 'thumbnail' ? data.unite : undefined,
disableToolbox: variant !== 'modal',
hideMinMaxLabel:
dataset[0].source.length <= 1 && dataset[1].source.length <= 1,
});

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ type OptionsProps = {
titre?: string;
unite?: string;
disableToolbox?: boolean;
hideMinMaxLabel?: boolean;
};

// génère le paramétrage du graphe
Expand All @@ -96,6 +97,7 @@ export const makeOption = ({
titre,
unite,
disableToolbox = false,
hideMinMaxLabel = false,
}: OptionsProps): EChartsOption => {
const {
grid: customGrid,
Expand Down Expand Up @@ -144,8 +146,8 @@ export const makeOption = ({
axisLabel: {
formatter: '{yyyy}',
color: colors.primary['9'],
showMinLabel: true,
showMaxLabel: true,
showMinLabel: !hideMinMaxLabel,
showMaxLabel: !hideMinMaxLabel,
margin: 15,
},
},
Expand Down

0 comments on commit b748cda

Please sign in to comment.