GitHub user dosubot[bot] added a comment to the discussion: Default formatting for chart values
<!-- Answer --> Superset uses adaptive formatting (e.g., "M" for millions, "k" for thousands) as the default for metric values in table charts. To display numbers in decimal format instead, you can set a specific D3 format (like `,.2f` for two decimal places) for each metric or column using the "Customize columns" panel in the chart controls. There isn't a global UI setting to change the default for all charts from adaptive to decimal—formatting is controlled per chart or per metric via the UI or dataset metadata. If you want to enforce decimal formatting everywhere by default, you would need to edit the chart plugin's control panel configuration in the codebase and set the default value for the relevant format control (such as `y_axis_format`) to a decimal format like `,.2f` [cite](https://github.com/apache/superset/discussions/36452) [cite](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx#L20-L809 ). The `D3_FORMAT` setting in `superset_config.py` only affects decimal/thousands separators and currency symbols, not the choice between adaptive and decimal formatting [cite](https://github.com/apache/superset/discussions/34553). For most users, the best approach is to set the desired D3 format string in the chart controls or dataset metadata for each metric or column you want to display in decimal format. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ee745a5e-6999-4730-a1b0-e9bee1bd9006?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ee745a5e-6999-4730-a1b0-e9bee1bd9006?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ee745a5e-6999-4730-a1b0-e9bee1bd9006?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ee745a5e-6999-4730-a1b0-e9bee1bd9006?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ee745a5e-6999-4730-a1b0-e9bee1bd9006?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ee745a5e-6999-4730-a1b0-e9bee1bd9006?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ee745a5e-6999-4730-a1b0-e9bee1bd9006?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Superset%20uses%20adaptive%20formatting%20%28e.g.%2C%20%22M%22%20for%20millions%2C%20%22k%22%20for%20thousands%29%20as%20the%20default%20for%20metric%20values%20in%20table%20charts.%20To%20display%20numbers%20in%20decimal%20format%20instead%2C%20you%20can%20set%20a%20specific%20D3%20format%20%28like%20%60%2C.2f%60%20for%20two%20decimal%20places%29%20for%20each%20metric%20or%20column%20using%20the%20%22Customize%20columns%22%20panel%20in%20the%20chart%20controls.%20There%20isn%27t%20a%20global%20UI%20setting%20to%20change%20the%20default%20for%20all%20charts%20from%20adaptive%20to%20decimal%E2%80%94formatting%20is%20controlled%20per%20chart%20or%20per%20metric%20via%20the%20UI%20or%20dataset%20metadata.%20If%20you%20want%20to%20enforce%20decimal%20form atting%20everywhere%20by%20default%2C%20you%20would%20need%20to%20edit%20the%20chart%20plugin%27s%20control%20panel%20configuration%20in%20the%20codebase%20and%20set%20the%20default%20value%20for%20the%20relevant%20format%20control%20%28such%20as%20%60y_axis_format%60%29%20to%20a%20decimal%20format%20like%20%60%2C.2f%60%C2%A0%5Bcite%5D%28https%3A//github.com/apache/superset/discussions/36452%29%C2%A0%5Bcite%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx%23L20-L809%29.%0A%0AThe%20%60D3_FORMAT%60%20setting%20in%20%60superset_config.py%60%20only%20affects%20decimal/thousands%20separators%20and%20currency%20symbols%2C%20not%20the%20choice%20between%20adaptive%20and%20decimal%20formatting%C2%A0%5Bcite%5D%28https%3A//github.com/apache/superset/discussions/34553%29.%20For%20most%20users%2C%20the%20best%20approach%20is%20to%20set%20the%20desired%20D3%20format%20string%20in%20the%20char t%20controls%20or%20dataset%20metadata%20for%20each%20metric%20or%20column%20you%20want%20to%20display%20in%20decimal%20format.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36852) GitHub link: https://github.com/apache/superset/discussions/36852#discussioncomment-15361215 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
