Skip to content

Commit

Permalink
[ML] Fix y axis ticks. (#116670)
Browse files Browse the repository at this point in the history
Fixes the y axis ticks for chart variants where the maximum transaction count for overall buckets is only 1.
  • Loading branch information
walterra authored Oct 30, 2021
1 parent 151968b commit 2cfcb8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function TransactionDistributionChart({
Math.max(
...flatten(data.map((d) => d.histogram)).map((d) => d.doc_count)
) ?? 0;
const yTicks = Math.ceil(Math.log10(yMax));
const yTicks = Math.max(1, Math.ceil(Math.log10(yMax)));
const yAxisDomain = {
min: 0.5,
max: Math.pow(10, yTicks),
Expand Down

0 comments on commit 2cfcb8c

Please sign in to comment.