GitHub user dosubot[bot] added a comment to the discussion: Time Grain Filter
<!-- Answer --> Superset does not currently provide a built-in way to restrict or customize the available time grain options in the time grain filter based on your dataset's column type. The list of granularities (seconds, minutes, hours, days, etc.) is hardcoded in the frontend, so options like seconds and minutes will appear even if your data only contains dates without time information. Customizing these choices would require modifying the frontend code where the time grain options are defined, such as in the SelectControl configuration for the granularity filter [example](https://github.com/apache/superset/blob/master/superset-frontend/src/explore/controls.jsx) [example](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx). If you need to hide certain granularities, the only current approach is to fork Superset and adjust the relevant frontend files to remove the unwanted options. There is no UI or configuration setting for this as of now. <!-- 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/304a8675-6533-4e50-9b59-5c16869c74ac?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/304a8675-6533-4e50-9b59-5c16869c74ac?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/304a8675-6533-4e50-9b59-5c16869c74ac?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/304a8675-6533-4e50-9b59-5c16869c74ac?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/304a8675-6533-4e50-9b59-5c16869c74ac?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/304a8675-6533-4e50-9b59-5c16869c74ac?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/304a8675-6533-4e50-9b59-5c16869c74ac?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](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/36188) GitHub link: https://github.com/apache/superset/discussions/36188#discussioncomment-15015396 ---- 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]
