[$175] Insights - KZT currency symbol is shown as empty box on chart axis
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: 9.5.54-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/App/pull/107748 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: macOS / Chrome App Component: Other
Action Performed:
Precondition: Control workspace with KZT default currency and a few expenses.
- Open staging.new.expensify.com
- Go to Insights > Spend
- Make sure Group currency is KZT
- Wait for charts to load
- Look at the axis labels on Spend over time, Top spenders and Top merchants charts
Expected Result:
Axis labels show the tenge symbol ₸ (e.g. ₸800), the same way other currencies show their symbols (₹800, ₽100).
Actual Result:
Axis labels show an empty box instead of the currency symbol (e.g. ▯800, ▯600) on all Insights charts. The app uses 〒 (U+3012, Japanese postal mark) as the KZT symbol instead of ₸ (U+20B8). The currency list shows "KZT - 〒". The chart font has no 〒 glyph, so it is drawn as an empty box. Other currencies render correctly on the same charts: USD ($), INR (₹), RUB (₽), THB (฿), AMD (դր), BGN (лв), GEL (ლ). Only KZT is broken.
Workaround:
Unknown
Platforms:
- [ ] Android: App
- [ ] Android: mWeb Chrome
- [ ] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [x] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/af59055c-89be-423d-83e1-087752ae3c1b
Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7324395
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022125690486447560664
- Upwork Job ID: 2125690486447560664
- Last Price Increase: 2026-11-25
Issue Owner
Current Issue Owner: @luacmartins
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/7c866631c559b8a98e3d9da1446595fa608935f524cbc07a14653281919fea4f
Triggered auto assignment to Contributor-plus team member for initial proposal review - @huult (External)
Job added to Upwork: https://www.upwork.com/jobs/~022125690486447560664
Proposal
What is the root cause of that problem?
Medium confidence: The evidence supports incorrect currency metadata combined with an inactive chart fallback.
Charts prioritize the supplied currency symbol over the browser’s localized symbol. If KZT supplies 〒 (Japanese postal mark), that incorrect character reaches the chart labels unchanged. Both affected chart implementations also omit the font manager required to activate the existing unsupported-character fallback.
Code evidence
- The KZT test fixture contains
〒, corroborating the report. - CurrencyListContextProvider:21–27 reads symbols directly from Onyx.
- SearchChartView:245–251 prefers that symbol over the localized fallback.
- useChartLabelFormats:41–43 checks glyph support only when given a font manager. Neither bar charts:100–105 nor line charts:119–124 supplies one.
Not independently verified: the affected session’s live metadata and loaded fonts. Consequently, the precise reason for the empty-box rendering remains unconfirmed.
What changes do you think we should make in order to solve the problem?
Escalate to an internal engineer before accepting an App-only fix. Currency metadata comes from OpenApp, outside this repository; the fixture documentation explicitly identifies that source and warns that fixtures can become outdated.
Confirm the live KZT symbol and identify its authoritative backend owner. Then verify that the correct ₸ renders across all three charts. The missing chart fallback is a separate confirmed integration gap, but addressing it alone would not establish the expected result.
What alternative solutions did you explore? (Optional)
- Font-only change: Could make the postal mark visible, but would leave the wrong currency symbol.
- Fixture-only change: Would not change production metadata.
- Localized fallback alone: May display
KZT, rather than the required₸.
Next Steps for Contributor+ team:
Internal verification is required before implementation.
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/108030) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Insights charts for a KZT workspace, the axis labels show an empty box (▯800) instead of the tenge symbol (₸800).
What is the root cause of that problem?
Two things combine:
-
The currency list gives
〒(U+3012) as the KZT symbol, andSearchChartViewuses that list symbol first. It only falls back to the Intl symbol when the list has no symbol at all: https://github.com/Expensify/App/blob/179cb6263a4668c00a18429d5b3f707bef04570a/src/components/Search/SearchChartView.tsx#L247-L251 Also, that Intl fallback uses the defaultcurrencyDisplay: 'symbol', which gives the plain codeKZTin en-US, not₸. -
The charts already have a guard for this case.
useChartLabelFormatsswaps tounit.fallbackwhen the chart fonts can't draw the unit: https://github.com/Expensify/App/blob/179cb6263a4668c00a18429d5b3f707bef04570a/src/components/Charts/hooks/useChartLabelFormats.ts#L41-L43 But it only does that when afontManageris passed in, and none of the chart callers pass one. They pass it to the measurement and layout hooks right next to it, but not to this hook:
- Bar charts (Top spenders, Top merchants, bar view): https://github.com/Expensify/App/blob/179cb6263a4668c00a18429d5b3f707bef04570a/src/components/Charts/BarChart/VerticalBarChartContent.tsx#L100-L105
- Line chart (Spend over time): https://github.com/Expensify/App/blob/179cb6263a4668c00a18429d5b3f707bef04570a/src/components/Charts/LineChart/LineChartContent.tsx#L119-L124
- Pie chart: https://github.com/Expensify/App/blob/179cb6263a4668c00a18429d5b3f707bef04570a/src/components/Charts/PieChart/PieChartContent.tsx#L100
So canFontRenderText is never run, 〒 reaches the Skia paragraph unchanged, and no font in the chart chain has that glyph, so it is drawn as ▯.
What changes do you think we should make in order to solve the problem?
Fix it in the App so it works whatever the backend symbol is:
- Pass the
fontManagerthe chart content components already have (anduseChartFontManager()in the pie chart) intouseChartLabelFormatsin the bar, line and pie charts. This turns on the existing glyph check, so a symbol the chart fonts can't draw is replaced by the fallback instead of a box. - In
SearchChartView, build the fallback symbol withcurrencyDisplay: 'narrowSymbol'. For KZT that gives₸, which NotoSans-Symbols in the chart font chain can draw, so the label reads₸800as expected and doesn't fall back toKZT 800. Keep the currency code as the last fallback if even the narrow symbol isn't drawable. - Optional and separate: ask internal to correct the KZT symbol in the backend currency list (
〒→₸). This also fixes the currency picker ("KZT - 〒"). Steps 1 and 2 keep the charts safe from any other bad or unsupported symbol either way.
Unit tests: add useChartLabelFormats cases where an undrawable unit with a fontManager uses the fallback, and a SearchChartView case where KZT gives the ₸ fallback.
What alternative solutions did you explore? (Optional)
Only fixing the backend symbol. That fixes KZT but leaves every chart open to the same ▯ for any other symbol the chart fonts don't cover, because the existing guard stays switched off.
How this differs from MelvinBot's proposal: Melvin suggests escalating to an internal engineer before any App fix. This proposal is an App-only fix that can ship now. It turns on the existing fallback in all three chart types, including the pie chart, which Melvin didn't mention. It also makes the fallback the real tenge symbol ₸ (narrowSymbol) instead of KZT, which is what the expected result asks for.
Contributor details
Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01be5d412b545fdf18
Proposal
Please re-state the problem that we are trying to solve in this issue?
On Insights charts (including Spend over time, Top spenders, and Top merchants), when a workspace's default currency is Kazakhstani Tenge (KZT), the chart's vertical axis tick labels render a missing glyph replacement box (e.g. ▯800, ▯600) instead of the tenge symbol (₸800) or clean currency representation.
What is the root cause of that problem?
There are two compounding defects across chart font fallback and currency formatting:
-
fontManageris never passed intouseChartLabelFormatsby chart content components: Insrc/components/Charts/hooks/useChartLabelFormats.ts:41-43:const displayUnit = typeof unit === 'string' ? unit : unit?.value; const fallbackUnit = typeof unit === 'string' ? undefined : unit?.fallback; const unitToDisplay = fontManager && !canFontRenderText(displayUnit, fontManager) ? fallbackUnit : displayUnit;The
useChartLabelFormatshook contains an intentional safeguard designed to detect when a unit glyph cannot be rendered by the chart's Skia typefaces viacanFontRenderText(displayUnit, fontManager)and fall back tofallbackUnit.However, all three chart content components fail to pass
fontManagerintouseChartLabelFormats:src/components/Charts/BarChart/VerticalBarChartContent.tsx:100-105: Obtainsconst fontManager = useChartFontManager();at line 86 (and passes it togetYAxisLabelWidthat line 108), but omitsfontManagerfromuseChartLabelFormats.src/components/Charts/LineChart/LineChartContent.tsx:119-124: ObtainsfontManagerat line 98, but omits it fromuseChartLabelFormats.src/components/Charts/PieChart/PieChartContent.tsx:100: OmitsfontManagerfromuseChartLabelFormats.
Because
fontManagerisundefined, the conditionfontManager && !canFontRenderText(...)is always falsy. The fallback mechanism is completely dormant, so whatever raw string is provided inunit.valueis passed directly to the Skia text renderer. -
Currency list supplies Japanese postal mark
〒(U+3012) for KZT instead of₸(U+20B8), andSearchChartViewuses default currency display:- In
tests/unit/currencyList.json:410-414(and the backend currency list), KZT is defined with"symbol": "〒"(U+3012, Japanese postal mark) instead of"₸"(U+20B8, Kazakhstani Tenge). - In
src/components/Search/SearchChartView.tsx:247-251:const parts = formatToParts(preferredLocale, 0, {style: 'currency', currency}); const currencyIndex = parts.findIndex((p) => p.type === 'currency'); const integerIndex = parts.findIndex((p) => p.type === 'integer'); const intlSymbol = parts.find((p) => p.type === 'currency')?.value; const unit = isAmountMetric ? {value: getCurrencySymbol(currency) ?? intlSymbol ?? currency, fallback: intlSymbol ?? currency} : undefined;getCurrencySymbol('KZT')returns"〒". The Skia chart fonts bundled with the application (src/components/Charts/utils/chartFontAssets.ts:NotoSans-Symbols.ttf,ExpensifyNeue, etc.) do not have the Japanese postal mark glyph〒(U+3012). When Skia attempts to draw〒, it renders an empty box▯. - Furthermore,
formatToParts(preferredLocale, 0, {style: 'currency', currency})inenlocale defaults tocurrencyDisplay: 'symbol', which for KZT returns the plain code"KZT"rather than the tenge symbol"₸". In contrast, passing{style: 'currency', currency, currencyDisplay: 'narrowSymbol'}returns the authentic tenge symbol"₸"(U+20B8), whichNotoSans-Symbols.ttfcan natively render.
- In
What changes do you think we should make in order to solve the problem?
We resolve this robustly in the application layer:
-
Activate the Skia glyph fallback by passing
fontManagerin all chart content components:- In
src/components/Charts/BarChart/VerticalBarChartContent.tsx:100:@@ -102,6 +102,7 @@ function VerticalBarChartCanvas({ unit: yAxisUnit, unitPosition: yAxisUnitPosition, formatValue: formatValueOverride, + fontManager, }); - In
src/components/Charts/LineChart/LineChartContent.tsx:119:@@ -121,6 +121,7 @@ function LineChartCanvas({ unit: yAxisUnit, unitPosition: yAxisUnitPosition, formatValue: formatValueOverride, + fontManager, }); - In
src/components/Charts/PieChart/PieChartContent.tsx:100:@@ -1,5 +1,6 @@ import {useReportChartLoading} from '@components/Charts/components/ChartReveal'; import ChartTooltipLayer from '@components/Charts/components/ChartTooltipLayer'; +import {useChartFontManager} from '@components/Charts/context/ChartFontsContext'; import {CHART_GESTURE_TOUCH_ACTION, TOOLTIP_BAR_GAP, useChartLabelFormats, useTouchPinnedTooltip} from '@components/Charts/hooks'; ... @@ -97,7 +98,8 @@ function PieChartCanvas({ const [{key: primarySeriesKey}] = series; const processedSlices = processDataIntoSlices(data, primarySeriesKey, pieGeometry); - const {formatValue, formatExactValue, formatTotalValue} = useChartLabelFormats({data, unit: valueUnit, unitPosition: valueUnitPosition, formatValue: formatValueOverride}); + const fontManager = useChartFontManager(); + const {formatValue, formatExactValue, formatTotalValue} = useChartLabelFormats({data, unit: valueUnit, unitPosition: valueUnitPosition, formatValue: formatValueOverride, fontManager});
- In
-
Use
currencyDisplay: 'narrowSymbol'for chart axis formatting inSearchChartView: Insrc/components/Search/SearchChartView.tsx:247:@@ -244,7 +244,7 @@ function SearchChartView({ const firstItem = data.at(0); const currency = sanitizeCurrencyCode(firstItem?.currency ?? CONST.CURRENCY.USD); - const parts = formatToParts(preferredLocale, 0, {style: 'currency', currency}); + const parts = formatToParts(preferredLocale, 0, {style: 'currency', currency, currencyDisplay: 'narrowSymbol'}); const currencyIndex = parts.findIndex((p) => p.type === 'currency'); const integerIndex = parts.findIndex((p) => p.type === 'integer'); const intlSymbol = parts.find((p) => p.type === 'currency')?.value;Now, when KZT is selected:
unit.valueis"〒"(fromcurrencyList) andunit.fallbackis"₸"(fromformatToPartswithnarrowSymbol).canFontRenderText("〒", fontManager)returnsfalsebecauseNotoSans-Symbols.ttflacks glyph〒.useChartLabelFormatsimmediately selectsfallbackUnit("₸").canFontRenderText("₸", fontManager)returnstruebecauseNotoSans-Symbols.ttfnatively supports U+20B8.- The chart displays
₸800,₸600perfectly on all axis labels as expected. - If any other currency symbol is missing from Skia typefaces, it falls back gracefully without ever drawing an empty box
▯.
-
Separate backend task: Separately, internal team can update the backend currency dictionary (
〒->₸) so currency pickers also display₸. Our frontend fix makes charts immediately resilient to any font-unsupported symbol.
What alternative solutions did you explore? (Optional)?
- Only updating the backend currency list: Escalating to backend leaves the entire chart rendering pipeline vulnerable to
▯box glyphs whenever any currency, custom unit, or localized symbol lacks typeface support in Skia. ActivatingfontManagerinuseChartLabelFormatsis the correct, permanent architectural fix already envisioned in unit tests (tests/unit/components/Charts/useChartLabelFormats.test.ts:41).
Contributor details
Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0131dae36abcf59374
The root cause appears to be that the backend returns 〒 (U+3012, the Japanese postal mark) as the KZT currency symbol instead of ₸ (U+20B8, the Kazakhstani tenge sign).
The chart font doesn't support the 〒 glyph, so Skia renders it as an empty box.
I tested the following change locally, and it fixed the issue:
Onyx.merge('currencyList', {KZT: {symbol: '₸'}})
Could someone from the backend team check this and update the KZT currency symbol accordingly?
🎀 👀 🎀 c+ reviewed.
Triggered auto assignment to @luacmartins, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
PR in review