Skip to content

Commit

Permalink
Fix tooltip crash when out of range axis
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Feb 1, 2024
1 parent 9cf1523 commit 8c83e45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/x-charts/src/BarChart/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ const formatter: Formatter<'bar'> = (params, dataset) => {
return {
seriesOrder,
stackingGroups,
series: defaultizeValueFormatter(completedSeries, (v) =>
v === null ? '' : v.toLocaleString(),
),
series: defaultizeValueFormatter(completedSeries, (v) => (v == null ? '' : v.toLocaleString())),
};
};

Expand Down
4 changes: 1 addition & 3 deletions packages/x-charts/src/LineChart/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ const formatter: Formatter<'line'> = (params, dataset) => {
return {
seriesOrder,
stackingGroups,
series: defaultizeValueFormatter(completedSeries, (v) =>
v === null ? '' : v.toLocaleString(),
),
series: defaultizeValueFormatter(completedSeries, (v) => (v == null ? '' : v.toLocaleString())),
};
};

Expand Down

0 comments on commit 8c83e45

Please sign in to comment.