dosubot[bot] commented on issue #33905: URL: https://github.com/apache/superset/issues/33905#issuecomment-3015436529
<!-- Answer --> The main code for the ECharts Time Series Line Chart is in `superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts`—this registers the plugin and sets up the chart rendering logic, which is loaded from `../../EchartsTimeseries` and uses utility functions like `extractSeries` from `superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts` to process the data for the X axis and series display [[source]](https://github.com/apache/superset/blob/2e9939baf253e607a54722b1996baaf625e72133/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts). The issue with the last month's label not appearing is almost always due to the backend query not returning a row for that month—Superset's frontend does not pad missing time intervals, so if the data for the last month is missing, the label won't show up [[source]](https://github.com/apache/superset/blob/2e9939baf253e607a54722b1996baaf625e72133/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts). The backend time grain logic (including "month") is handled in `superset/db_engine_specs/base.py` [[source]](https://github.com/apache/superset/blob/2e9939baf253e607a54722b1996baaf625e72133/superset/db_engine_specs/base.py). To fix this, check the SQL generated for your chart and make sure the last month is included in the result set. If your time range is exclusive at the end, try making it inclusive. If you want the last month to appear even when there is no data, you’ll need to pad missing periods in the backend query (e.g., generate a series of all expected months and left join your data onto it). There isn’t a built-in frontend option to do this automatically. If you want to explore a frontend solution, you’d need to modify the logic in `extractSeries` to inject missing periods, but this is usually best handled on the backend for consistency across all visualizations. <!-- 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/316e310d-23dd-4b70-86db-dcffc8cbdcba?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/316e310d-23dd-4b70-86db-dcffc8cbdcba?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/316e310d-23dd-4b70-86db-dcffc8cbdcba?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/316e310d-23dd-4b70-86db-dcffc8cbdcba?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/316e310d-23dd-4b70-86db-dcffc8cbdcba?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/316e310d-23dd-4b70-86db-dcffc8cbdcba?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/316e310d-23dd-4b70-86db-dcffc8cbdcba?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [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/33905) -- 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]
