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:
@@ -1142,6 +1142,7 @@ type PieChartConfiguration {
|
||||
showCenterMetric: Boolean
|
||||
displayLegend: Boolean
|
||||
hideEmptyCategory: Boolean
|
||||
numberFormat: ChartNumberFormat
|
||||
splitMultiValueFields: Boolean
|
||||
description: String
|
||||
color: String
|
||||
@@ -1195,6 +1196,7 @@ type LineChartConfiguration {
|
||||
axisNameDisplay: AxisNameDisplay
|
||||
displayDataLabel: Boolean
|
||||
displayLegend: Boolean
|
||||
numberFormat: ChartNumberFormat
|
||||
rangeMin: Float
|
||||
rangeMax: Float
|
||||
description: String
|
||||
@@ -1238,6 +1240,7 @@ type BarChartConfiguration {
|
||||
axisNameDisplay: AxisNameDisplay
|
||||
displayDataLabel: Boolean
|
||||
displayLegend: Boolean
|
||||
numberFormat: ChartNumberFormat
|
||||
rangeMin: Float
|
||||
rangeMax: Float
|
||||
description: String
|
||||
|
||||
Reference in New Issue
Block a user