Skip to content

Commit

Permalink
🐛 (tooltip): add explanation test for tolerance notice (#3919)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann authored Sep 2, 2024
1 parent 9ff5a51 commit 1f3c2d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import {
TooltipValue,
TooltipState,
makeTooltipRoundingNotice,
makeTooltipToleranceNotice,
} from "../tooltip/Tooltip"
import {
HorizontalCategoricalColorLegend,
Expand Down Expand Up @@ -992,7 +993,10 @@ export class MarimekkoChart
? timeColumn.formatValue(endTime)
: undefined
const toleranceNotice = targetNotice
? { icon: TooltipFooterIcon.notice, text: targetNotice }
? {
icon: TooltipFooterIcon.notice,
text: makeTooltipToleranceNotice(targetNotice),
}
: undefined

const columns = excludeUndefined([xColumn, yColumn])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import {
TooltipState,
TooltipTable,
makeTooltipRoundingNotice,
makeTooltipToleranceNotice,
} from "../tooltip/Tooltip"
import { StackedPoint, StackedSeries } from "./StackedConstants"
import { ColorSchemes } from "../color/ColorSchemes"
Expand Down Expand Up @@ -813,7 +814,10 @@ export class StackedDiscreteBarChart
: undefined

const toleranceNotice = targetNotice
? { icon: TooltipFooterIcon.notice, text: targetNotice }
? {
icon: TooltipFooterIcon.notice,
text: makeTooltipToleranceNotice(targetNotice),
}
: undefined
const roundingNotice = this.formatColumn.roundsToSignificantFigures
? {
Expand Down

0 comments on commit 1f3c2d9

Please sign in to comment.