dosubot[bot] commented on issue #37069:
URL: https://github.com/apache/superset/issues/37069#issuecomment-3742643046

   <!-- Answer -->
   You can customize the "No Data" or empty state messages in Superset, but the 
approach depends on whether you want a global change or a per-chart 
customization.
   
   For the big-number legacy chart, the default "No data" and related messages 
are defined in the chart's React component. If you're embedding the chart 
programmatically (using SuperChart or similar), you can pass a custom subtitle 
prop to override the default empty state message. Otherwise, to change the 
message for all big-number charts, you can edit the relevant strings in the 
plugin code (see BigNumberViz.tsx) or override the translation string for "No 
data" and the subtitle messages in your locale files. The relevant messages 
are: "No data", "No data after filtering or data is NULL for the latest time 
record", and "Try applying different filters or ensuring your datasource has 
data" 
[source](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx).
   
   For other visuals, the "No Data" message is also typically defined as a 
translatable string in the chart plugin/component code. You can globally 
override these messages by editing your Superset translation files 
(messages.po) for your language and rebuilding the frontend assets. For 
example, search for and change the msgstr for msgid "No Data" in your locale's 
messages.po file 
[source](https://github.com/apache/superset/blob/master/superset/translations/en/LC_MESSAGES/messages.po).
   
   There is no built-in per-chart UI option in the dashboard editor to set a 
custom empty state message for individual charts. For more granular control, 
you would need to modify the chart plugin code to accept a custom message via 
formData or props.
   
   Summary:  
   - For global changes, override the translation strings and rebuild assets.
   - For the big-number chart, you can pass a custom subtitle prop if 
embedding, or edit the plugin code for a global change.
   - For other charts, edit the plugin/component code or translation files as 
needed.
   
   Let me know if you want a step-by-step for any of these approaches!
   
   
   <!-- 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/00a8b931-19a6-4444-bd79-ed33fef91235?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/00a8b931-19a6-4444-bd79-ed33fef91235?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/00a8b931-19a6-4444-bd79-ed33fef91235?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/00a8b931-19a6-4444-bd79-ed33fef91235?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/00a8b931-19a6-4444-bd79-ed33fef91235?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/00a8b931-19a6-4444-bd79-ed33fef91235?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/00a8b931-19a6-4444-bd79-ed33fef91235?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=You%20can%20customize%20the%20%22No%20Data%22%20or%20empty%20state%20messages%20in%20Superset%2C%20but%20the%20approach%20depends%20on%20whether%20you%20want%20a%20global%20change%20or%20a%20per-chart%20customization.%0A%0AFor%20the%20big-number%20legacy%20chart%2C%20the%20default%20%22No%20data%22%20and%20related%20messages%20are%20defined%20in%20the%20chart%27s%20React%20component.%20If%20you%27re%20embedding%20the%20chart%20programmatically%20%28using%20SuperChart%20or%20similar%29%2C%20you%20can%20pass%20a%20custom%20subtitle%20prop%20to%20override%20the%20default%20empty%20state%20message.%20Otherwise%2C%20to%20change%20the%20message%20for%20all%20big-number%20charts%2C%20you%20can%20edit%20the%20relevant%20strings%20in%20the%20plugin%20code%2
 
0%28see%20BigNumberViz.tsx%29%20or%20override%20the%20translation%20string%20for%20%22No%20data%22%20and%20the%20subtitle%20messages%20in%20your%20locale%20files.%20The%20relevant%20messages%20are%3A%20%22No%20data%22%2C%20%22No%20data%20after%20filtering%20or%20data%20is%20NULL%20for%20the%20latest%20time%20record%22%2C%20and%20%22Try%20applying%20different%20filters%20or%20ensuring%20your%20datasource%20has%20data%22%20%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberViz.tsx%29.%0A%0AFor%20other%20visuals%2C%20the%20%22No%20Data%22%20message%20is%20also%20typically%20defined%20as%20a%20translatable%20string%20in%20the%20chart%20plugin/component%20code.%20You%20can%20globally%20override%20these%20messages%20by%20editing%20your%20Superset%20translation%20files%20%28messages.po%29%20for%20your%20language%20and%20rebuilding%20the%20frontend%20assets.%20For%20example%2C%20search%20for%20and%20change%20
 
the%20msgstr%20for%20msgid%20%22No%20Data%22%20in%20your%20locale%27s%20messages.po%20file%20%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset/translations/en/LC_MESSAGES/messages.po%29.%0A%0AThere%20is%20no%20built-in%20per-chart%20UI%20option%20in%20the%20dashboard%20editor%20to%20set%20a%20custom%20empty%20state%20message%20for%20individual%20charts.%20For%20more%20granular%20control%2C%20you%20would%20need%20to%20modify%20the%20chart%20plugin%20code%20to%20accept%20a%20custom%20message%20via%20formData%20or%20props.%0A%0ASummary%3A%20%20%0A-%20For%20global%20changes%2C%20override%20the%20translation%20strings%20and%20rebuild%20assets.%0A-%20For%20the%20big-number%20chart%2C%20you%20can%20pass%20a%20custom%20subtitle%20prop%20if%20embedding%2C%20or%20edit%20the%20plugin%20code%20for%20a%20global%20change.%0A-%20For%20other%20charts%2C%20edit%20the%20plugin/component%20code%20or%20translation%20files%20as%20needed.%0A%0ALet%20me%20know%20if%20you%20want%20a%
 20step-by-step%20for%20any%20of%20these%20approaches%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/issues/37069)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to