feat(dashboard): extend number format option to bar, line and pie charts (#23505)

https://discord.com/channels/1130383047699738754/1509604545381142649

Extends the Format option (Short/Full) added for the Number widget in
#21521 to bar, line and pie charts.

Format controls the numbers printed on the chart face: data labels and
the pie center metric. Axis ticks stay abbreviated and tooltips always
show the full value. Defaults to Short, so existing charts render
unchanged.

Server: nullable `numberFormat` on the bar/line/pie configuration DTOs,
exposed in the dashboard AI tool schema. No migration, configuration is
jsonb.

Deferred:
- The Format row has no visible effect while data labels are off, since
tooltips are always full.
- Number widget format defaults differ by field type (CURRENCY defaults
to Short, NUMBER to Full). Pre-existing, untouched here.


https://github.com/user-attachments/assets/0778f08a-6681-4e7a-8716-fb3026d1e01f



<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/23505?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
This commit is contained in:
nitin
2026-07-30 15:12:21 +05:30
committed by GitHub
parent 72322a4d72
commit 079e9b8e56
39 changed files with 530 additions and 60 deletions
@@ -35,6 +35,7 @@ export type PieChartConfiguration = BaseChartConfiguration & {
showCenterMetric?: boolean;
displayLegend?: boolean;
hideEmptyCategory?: boolean;
numberFormat?: string;
splitMultiValueFields?: boolean;
};
@@ -54,6 +55,7 @@ export type BarChartConfiguration = BaseChartConfiguration & {
splitMultiValueFields?: boolean;
axisNameDisplay?: string;
displayLegend?: boolean;
numberFormat?: string;
rangeMin?: number;
rangeMax?: number;
groupMode?: string;
@@ -77,6 +79,7 @@ export type LineChartConfiguration = BaseChartConfiguration & {
splitMultiValueFields?: boolean;
axisNameDisplay?: string;
displayLegend?: boolean;
numberFormat?: string;
rangeMin?: number;
rangeMax?: number;
isStacked?: boolean;