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

   <!-- Answer -->
   The Advanced Analytics feature is intentionally hidden for non-temporal 
(non-date) x-axis fields in the latest Superset versions. There is no feature 
flag named HIDE_ADVANCED_ANALYTICS_FOR_NON_TEMPORAL_X_AXIS in the codebase, so 
you cannot enable this feature via configuration or environment variable. This 
restriction exists because time-based analytics (like rolling windows or time 
comparisons) are only meaningful for temporal data, and the visibility is 
enforced in the frontend code by checking if the x-axis is a date/time 
field[^1][^2].
   
   If you need similar analytics for categorical axes, you’ll need to 
pre-calculate them in your dataset or SQL query. Enabling Advanced Analytics 
for non-temporal axes would require a code change in the frontend, specifically 
in the logic that controls the visibility of these controls.
   
   If you want to enable or disable other feature flags in Superset, you can do 
so in superset_config.py under FEATURE_FLAGS or by setting environment 
variables prefixed with SUPERSET_FEATURE_, but this will not affect the 
Advanced Analytics controls for non-temporal axes[^3].
   
   [^1]: [Changelog: hide advanced analytics for non-temporal 
x-axis](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-chart-controls/CHANGELOG.md)
   [^2]: [displayTimeRelatedControls 
logic](https://github.com/apache/superset-frontend/packages/superset-ui-chart-controls/test/utils/displayTimeRelatedControls.test.ts)
   [^3]: [Feature flag 
configuration](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py#L460-L2008)
   
   
   <!-- 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/1bbad859-85df-4b58-8808-5f6e567853b3?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/1bbad859-85df-4b58-8808-5f6e567853b3?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/1bbad859-85df-4b58-8808-5f6e567853b3?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/1bbad859-85df-4b58-8808-5f6e567853b3?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/1bbad859-85df-4b58-8808-5f6e567853b3?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/1bbad859-85df-4b58-8808-5f6e567853b3?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/1bbad859-85df-4b58-8808-5f6e567853b3?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=The%20Advanced%20Analytics%20feature%20is%20intentionally%20hidden%20for%20non-temporal%20%28non-date%29%20x-axis%20fields%20in%20the%20latest%20Superset%20versions.%20There%20is%20no%20feature%20flag%20named%20HIDE_ADVANCED_ANALYTICS_FOR_NON_TEMPORAL_X_AXIS%20in%20the%20codebase%2C%20so%20you%20cannot%20enable%20this%20feature%20via%20configuration%20or%20environment%20variable.%20This%20restriction%20exists%20because%20time-based%20analytics%20%28like%20rolling%20windows%20or%20time%20comparisons%29%20are%20only%20meaningful%20for%20temporal%20data%2C%20and%20the%20visibility%20is%20enforced%20in%20the%20frontend%20code%20by%20checking%20if%20the%20x-axis%20is%20a%20date/time%20field%5B%5E1%5D%5B%5E2%5D.%0A%0AIf%20you%20need%20similar%20analytics
 
%20for%20categorical%20axes%2C%20you%E2%80%99ll%20need%20to%20pre-calculate%20them%20in%20your%20dataset%20or%20SQL%20query.%20Enabling%20Advanced%20Analytics%20for%20non-temporal%20axes%20would%20require%20a%20code%20change%20in%20the%20frontend%2C%20specifically%20in%20the%20logic%20that%20controls%20the%20visibility%20of%20these%20controls.%0A%0AIf%20you%20want%20to%20enable%20or%20disable%20other%20feature%20flags%20in%20Superset%2C%20you%20can%20do%20so%20in%20superset_config.py%20under%20FEATURE_FLAGS%20or%20by%20setting%20environment%20variables%20prefixed%20with%20SUPERSET_FEATURE_%2C%20but%20this%20will%20not%20affect%20the%20Advanced%20Analytics%20controls%20for%20non-temporal%20axes%5B%5E3%5D.%0A%0A%5B%5E1%5D%3A%20%5BChangelog%3A%20hide%20advanced%20analytics%20for%20non-temporal%20x-axis%5D%28https%3A//github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-chart-controls/CHANGELOG.md%29%0A%5B%5E2%5D%3A%20%5BdisplayTimeRelatedControls%20logic%5D%28h
 
ttps%3A//github.com/apache/superset-frontend/packages/superset-ui-chart-controls/test/utils/displayTimeRelatedControls.test.ts%29%0A%5B%5E3%5D%3A%20%5BFeature%20flag%20configuration%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py%23L460-L2008%29)&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/37108)


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