Skip to content

Commit

Permalink
fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
JCQuintas committed Aug 12, 2024
1 parent 9942358 commit bb563f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/data/charts/lines/AreaBaseline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function AreaBaseline() {
{
data: [2, -5.5, 2, -7.5, 1.5, 6],
area: true,
baseline: 'min',
baseline: 'min',
},
]}
width={500}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/charts/lines/AreaBaseline.tsx.preview
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
data: [2, -5.5, 2, -7.5, 1.5, 6],
area: true,
baseline: 'min',
baseline: 'min',
},
]}
width={500}
Expand Down
4 changes: 3 additions & 1 deletion packages/x-charts/src/LineChart/extremums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export const getExtremumY: ExtremumGetter<'line'> = (params) => {

// Since this series is not used to display an area, we do not consider the base (the d[0]).
const getValues: GetValuesTypes =
isArea && axis.scaleType !== 'log' && typeof series[seriesId].baseline !== 'string' ? (d) => d : (d) => [d[1], d[1]];
isArea && axis.scaleType !== 'log' && typeof series[seriesId].baseline !== 'string'
? (d) => d
: (d) => [d[1], d[1]];

const seriesExtremums = getSeriesExtremums(getValues, stackedData);

Expand Down

0 comments on commit bb563f4

Please sign in to comment.