GitHub user dosubot[bot] added a comment to the discussion: Default Chart type 
on Explore

<!-- Answer -->
Yes, you can change the default value format for Pivot Table (and other charts) 
in Superset, but it requires editing the chart plugin's control panel 
configuration in the codebase.

For Pivot Table, the "Value format" control uses the shared `y_axis_format` 
setting, which defaults to a centralized number format. To change the default, 
update the `default` value for `y_axis_format` in the shared controls file 
([reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx#L20-L313)),
 or directly in the Pivot Table control panel 
([reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx#L281-L306)).
 You can set formats like `,.2f` for two decimals, `%` for percentage, etc.

For global number formatting (affecting all charts), you can set the 
`D3_FORMAT` dictionary in your `superset_config.py` file. This changes how 
numbers are displayed in the UI, but does not affect CSV/Excel exports 
([reference](https://github.com/apache/superset/discussions/35528)).

If you need to customize currency or date formats, there are also 
`currency_format` and `date_format` controls available in the Pivot Table 
options.

Let me know if you want step-by-step instructions for editing these files!


<!-- 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/6ebb0859-1d99-4921-96cc-6f9006024ec0?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/6ebb0859-1d99-4921-96cc-6f9006024ec0?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/6ebb0859-1d99-4921-96cc-6f9006024ec0?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/6ebb0859-1d99-4921-96cc-6f9006024ec0?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/6ebb0859-1d99-4921-96cc-6f9006024ec0?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/6ebb0859-1d99-4921-96cc-6f9006024ec0?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/6ebb0859-1d99-4921-96cc-6f9006024ec0?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Yes%2C%20you%20can%20change%20the%20default%20value%20format%20for%20Pivot%20Table%20%28and%20other%20charts%29%20in%20Superset%2C%20but%20it%20requires%20editing%20the%20chart%20plugin%27s%20control%20panel%20configuration%20in%20the%20codebase.%0A%0AFor%20Pivot%20Table%2C%20the%20%22Value%20format%22%20control%20uses%20the%20shared%20%60y_axis_format%60%20setting%2C%20which%20defaults%20to%20a%20centralized%20number%20format.%20To%20change%20the%20default%2C%20update%20the%20%60default%60%20value%20for%20%60y_axis_format%60%20in%20the%20shared%20controls%20file%20%28%5Breference%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedContr
 
ols.tsx%23L20-L313%29%29%2C%20or%20directly%20in%20the%20Pivot%20Table%20control%20panel%20%28%5Breference%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/controlPanel.tsx%23L281-L306%29%29.%20You%20can%20set%20formats%20like%20%60%2C.2f%60%20for%20two%20decimals%2C%20%60%25%60%20for%20percentage%2C%20etc.%0A%0AFor%20global%20number%20formatting%20%28affecting%20all%20charts%29%2C%20you%20can%20set%20the%20%60D3_FORMAT%60%20dictionary%20in%20your%20%60superset_config.py%60%20file.%20This%20changes%20how%20numbers%20are%20displayed%20in%20the%20UI%2C%20but%20does%20not%20affect%20CSV/Excel%20exports%20%28%5Breference%5D%28https%3A//github.com/apache/superset/discussions/35528%29%29.%0A%0AIf%20you%20need%20to%20customize%20currency%20or%20date%20formats%2C%20there%20are%20also%20%60currency_format%60%20and%20%60date_format%60%20controls%20available%20in%20the%20Pivot%20Table%20options
 
.%0A%0ALet%20me%20know%20if%20you%20want%20step-by-step%20instructions%20for%20editing%20these%20files%21)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36452)

GitHub link: 
https://github.com/apache/superset/discussions/36452#discussioncomment-15205266

----
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]

Reply via email to