GitHub user dosubot[bot] added a comment to the discussion: Feature Request: Dynamic Maximum Value for Bullet and Gauge Charts
<!-- Answer --> There isn't currently a way to set the maximum value of Bullet or Gauge charts dynamically based on a metric in Superset—the max value must be entered manually in the chart controls. This is a known limitation and a frequent feature request in the community ([discussion](https://github.com/apache/superset/discussions/28647), [discussion](https://github.com/apache/superset/discussions/36287)). For Bullet charts, the "Markers" (target/max) field only accepts static numbers, not metrics. For Gauge charts, the "max_val" is a static input as well ([code reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx#L66-L86)). A common workaround is to preprocess your data outside Superset (for example, in your database or ETL pipeline) so both the value and the target/max are available as columns, then use the value as the measure and manually set the max in the chart config ([workaround details](https://github.com/apache/superset/discussions/36287)). True dynamic max values would require custom plugin development or changes to the chart's transform logic ([related technical discussion](https://github.com/apache/superset/discussions/35054)). Let me know if you want more details on possible custom approaches or code pointers! <!-- 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/c52289b2-bbf2-47bd-9e66-1ea201370348?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c52289b2-bbf2-47bd-9e66-1ea201370348?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c52289b2-bbf2-47bd-9e66-1ea201370348?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c52289b2-bbf2-47bd-9e66-1ea201370348?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c52289b2-bbf2-47bd-9e66-1ea201370348?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c52289b2-bbf2-47bd-9e66-1ea201370348?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c52289b2-bbf2-47bd-9e66-1ea201370348?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=There%20isn%27t%20currently%20a%20way%20to%20set%20the%20maximum%20value%20of%20Bullet%20or%20Gauge%20charts%20dynamically%20based%20on%20a%20metric%20in%20Superset%E2%80%94the%20max%20value%20must%20be%20entered%20manually%20in%20the%20chart%20controls.%20This%20is%20a%20known%20limitation%20and%20a%20frequent%20feature%20request%20in%20the%20community%20%28%5Bdiscussion%5D%28https%3A//github.com/apache/superset/discussions/28647%29%2C%20%5Bdiscussion%5D%28https%3A//github.com/apache/superset/discussions/36287%29%29.%20For%20Bullet%20charts%2C%20the%20%22Markers%22%20%28target/max%29%20field%20only%20accepts%20static%20numbers%2C%20not%20metrics.%20For%20Gauge%20charts%2C%20the%20%22max_val%22%20is%20a%20static%20input%20as%20well%20%28%5Bcode%20refe rence%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx%23L66-L86%29%29.%0A%0AA%20common%20workaround%20is%20to%20preprocess%20your%20data%20outside%20Superset%20%28for%20example%2C%20in%20your%20database%20or%20ETL%20pipeline%29%20so%20both%20the%20value%20and%20the%20target/max%20are%20available%20as%20columns%2C%20then%20use%20the%20value%20as%20the%20measure%20and%20manually%20set%20the%20max%20in%20the%20chart%20config%20%28%5Bworkaround%20details%5D%28https%3A//github.com/apache/superset/discussions/36287%29%29.%20True%20dynamic%20max%20values%20would%20require%20custom%20plugin%20development%20or%20changes%20to%20the%20chart%27s%20transform%20logic%20%28%5Brelated%20technical%20discussion%5D%28https%3A//github.com/apache/superset/discussions/35054%29%29.%0A%0ALet%20me%20know%20if%20you%20want%20more%20details%20on%20possible%20custom%20approaches%20or%20code%20point ers%21) [](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/30170) GitHub link: https://github.com/apache/superset/discussions/30170#discussioncomment-15544497 ---- 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]
