dosubot[bot] commented on issue #37129: URL: https://github.com/apache/superset/issues/37129#issuecomment-3748875087
<!-- Answer --> To override the default "No data" messages in the Big Number (Legacy) chart, you need to update the relevant strings in your BigNumberViz.tsx file, then rebuild and deploy the frontend as part of a custom Superset Docker image. These messages are defined directly in the React component, so code changes are required for global or per-deployment customization—there’s no UI option for this in dashboards or chart settings. You can also override these messages globally via translation files if you want to change them for all users and languages, but for most use cases, editing the component is the most direct approach [citation](https://github.com/apache/superset/issues/37069). For Superset 6.0.0+, you must use Node.js 20.x for frontend builds (Node 16 will fail). Here’s a typical Dockerfile pattern for deploying your custom frontend changes: ```dockerfile FROM apache/superset:latest USER root # Copy your modified frontend code (replace with your actual path) COPY superset-frontend/ /app/superset-frontend/ # Rebuild frontend assets inside the container RUN cd /app/superset-frontend && \ npm ci && npm run build && \ cp -r /app/superset-frontend/build/* /app/superset/static/assets/ USER superset ``` If you only want to override a few files (like BigNumberViz.tsx), you can copy just those files instead of the whole directory to avoid build errors [citation](https://github.com/apache/superset/discussions/37031). After building your image (`docker build -t custom-superset .`), run it as usual. To verify your changes, embed or view the Big Number (Legacy) chart with no data and confirm your custom messages appear. For best practices: keep your changes under version control, and be aware that you’ll need to reapply or merge them if you upgrade Superset, since upstream changes may affect the same files. For development, you can use the Docker Compose dev environment and mount your local code for live updates without rebuilding the image [citation](https://github.com/apache/superset/discussions/37031). <!-- 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/c2b73713-e0c3-4012-9044-92018c774079?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c2b73713-e0c3-4012-9044-92018c774079?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c2b73713-e0c3-4012-9044-92018c774079?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c2b73713-e0c3-4012-9044-92018c774079?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c2b73713-e0c3-4012-9044-92018c774079?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c2b73713-e0c3-4012-9044-92018c774079?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c2b73713-e0c3-4012-9044-92018c774079?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=To%20override%20the%20default%20%22No%20data%22%20messages%20in%20the%20Big%20Number%20%28Legacy%29%20chart%2C%20you%20need%20to%20update%20the%20relevant%20strings%20in%20your%20BigNumberViz.tsx%20file%2C%20then%20rebuild%20and%20deploy%20the%20frontend%20as%20part%20of%20a%20custom%20Superset%20Docker%20image.%20These%20messages%20are%20defined%20directly%20in%20the%20React%20component%2C%20so%20code%20changes%20are%20required%20for%20global%20or%20per-deployment%20customization%E2%80%94there%E2%80%99s%20no%20UI%20option%20for%20this%20in%20dashboards%20or%20chart%20settings.%20You%20can%20also%20override%20these%20messages%20globally%20via%20translation%20files%20if%20you%20want%20to%20change%20them%20for%20all%20users%20and%20languages%2C%20but %20for%20most%20use%20cases%2C%20editing%20the%20component%20is%20the%20most%20direct%20approach%C2%A0%5Bcitation%5D%28https%3A//github.com/apache/superset/issues/37069%29.%0A%0AFor%20Superset%206.0.0%2B%2C%20you%20must%20use%20Node.js%2020.x%20for%20frontend%20builds%20%28Node%2016%20will%20fail%29.%20Here%E2%80%99s%20a%20typical%20Dockerfile%20pattern%20for%20deploying%20your%20custom%20frontend%20changes%3A%0A%0A%60%60%60dockerfile%0AFROM%20apache/superset%3Alatest%0AUSER%20root%0A%0A%23%20Copy%20your%20modified%20frontend%20code%20%28replace%20with%20your%20actual%20path%29%0ACOPY%20superset-frontend/%20/app/superset-frontend/%0A%0A%23%20Rebuild%20frontend%20assets%20inside%20the%20container%0ARUN%20cd%20/app/superset-frontend%20%26%26%20%5C%0A%20%20%20%20npm%20ci%20%26%26%20npm%20run%20build%20%26%26%20%5C%0A%20%20%20%20cp%20-r%20/app/superset-frontend/build/%2A%20/app/superset/static/assets/%0A%0AUSER%20superset%0A%60%60%60%0A%0AIf%20you%20only%20want%20to%20override%20a%20few %20files%20%28like%20BigNumberViz.tsx%29%2C%20you%20can%20copy%20just%20those%20files%20instead%20of%20the%20whole%20directory%20to%20avoid%20build%20errors%C2%A0%5Bcitation%5D%28https%3A//github.com/apache/superset/discussions/37031%29.%0A%0AAfter%20building%20your%20image%20%28%60docker%20build%20-t%20custom-superset%20.%60%29%2C%20run%20it%20as%20usual.%20To%20verify%20your%20changes%2C%20embed%20or%20view%20the%20Big%20Number%20%28Legacy%29%20chart%20with%20no%20data%20and%20confirm%20your%20custom%20messages%20appear.%0A%0AFor%20best%20practices%3A%20keep%20your%20changes%20under%20version%20control%2C%20and%20be%20aware%20that%20you%E2%80%99ll%20need%20to%20reapply%20or%20merge%20them%20if%20you%20upgrade%20Superset%2C%20since%20upstream%20changes%20may%20affect%20the%20same%20files.%20For%20development%2C%20you%20can%20use%20the%20Docker%20Compose%20dev%20environment%20and%20mount%20your%20local%20code%20for%20live%20updates%20without%20rebuilding%20the%20image%C2%A0%5Bcitati on%5D%28https%3A//github.com/apache/superset/discussions/37031%29.) [](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/issues/37129) -- 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]
