diff --git a/src/views/desktop/insights/tabs/ExplorerChartTab.vue b/src/views/desktop/insights/tabs/ExplorerChartTab.vue index 2da80162..a9481394 100644 --- a/src/views/desktop/insights/tabs/ExplorerChartTab.vue +++ b/src/views/desktop/insights/tabs/ExplorerChartTab.vue @@ -183,6 +183,7 @@ import { } from '@/stores/explorer.ts'; import { type NameValue, type TypeAndDisplayName } from '@/core/base.ts'; +import { NumeralSystem } from '@/core/numeral.ts'; import { Month, WeekDay } from '@/core/datetime.ts'; import { ChartSortingType, ExportMermaidChartType } from '@/core/statistics.ts'; import { @@ -468,7 +469,8 @@ function getCategoriedDataDisplayName(info: CategoriedInfo | SeriesInfo): string const parts = name.split('-'); const year = parts.length === 2 ? parts[0] : ''; const quarter = parts.length === 2 ? parseInt(parts[1] as string) : 0; - const dateTime = year && quarter ? parseDateTimeFromString(`${year}-${quarter * 3}`, TransactionExplorerDimensionType.YearMonth) : undefined; + const quarterLastMonth = quarter * 3; + const dateTime = year && quarterLastMonth ? parseDateTimeFromString(`${year}-${quarterLastMonth.toString(10).padStart(2, NumeralSystem.WesternArabicNumerals.digitZero)}`, TransactionExplorerDimensionType.YearMonth) : undefined; displayName = dateTime ? formatDateTimeToGregorianLikeYearQuarter(dateTime) : tt('Unknown'); } else if (dimession === TransactionExplorerDataDimension.DateTimeByYear.value) { const dateTime = parseDateTimeFromString(name, dimessionType);