dosubot[bot] commented on issue #30373: URL: https://github.com/apache/superset/issues/30373#issuecomment-2370858415
<!-- Greeting --> Hey @shreyansh1910! I'm here to help you with any bugs, questions, or contributions you have for Superset. Let's squash those bugs together! <!-- Answer --> A similar issue was reported and closed in [this GitHub issue](https://github.com/apache/superset/issues/20439) <sup>[[1]](https://github.com/apache/superset/issues/20439)</sup>. The problem is that the default time format is set to adaptive formatting (`SMART_DATE_ID`), which means that unless explicitly changed, the adaptive formatting will be applied. To resolve this, you need to change the time format setting in your chart configuration. Here is how you can do it: 1. **In the chart configuration:** Modify the `xAxisFormat` property in the `formData` object to your desired format. For example: ```tsx formData={{ ... xAxisFormat: '%d/%m/%Y', // or any other desired format ... }} ``` 2. **In the YAML configuration:** Change the `x_axis_time_format` property to your desired format. For example: ```yaml x_axis_time_format: '%d/%m/%Y' # or any other desired format ``` This should allow you to apply a different time format to the X-axis of your bar chart <sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-chart-controls/src/utils/D3Formatting.ts)</sup><sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/stories/timeFormat.tsx)</sup><sup>[[4]](https://github.com/apache/superset/blob/master/superset/examples/configs/charts/Featured Charts/Mixed.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- 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]
