madankgit opened a new issue, #37661:
URL: https://github.com/apache/superset/issues/37661

   ### Bug description
   
   In Apache Superset time-series charts, the X-axis displays future year 
labels and years with no corresponding data (e.g., 2027). These labels appear 
even when no metrics exist for those periods, leading to misleading visuals.
   
   ### **Steps to Reproduce:**
   
   1. Use a dataset containing a date column (date_value) containing data up to 
a current year (e.g., data available until 2026).
   2. Create a time-series Bar Chart 
   3. Configure:
       -   Time column: date_value
       -   Time Grain: Year
      
   4. Observe the X-axis labels
   
   <img width="916" height="304" alt="Image" 
src="https://github.com/user-attachments/assets/7f2c66d4-15c2-4dd9-b895-99c2d4f6584e";
 />
   
   <br><br>
   ### **Expected Behavior**
   
   Only years with available data (e.g., 2025–2026) should be displayed on the 
X-axis. Years with no data or future years (e.g., 2024 and 2027) should be 
excluded.
   
   <img width="503" height="228" alt="Image" 
src="https://github.com/user-attachments/assets/290cc10c-9c77-47d1-8041-ede1ac00b708";
 />
   
   <br><br>
   ### **Actual Behavior**
   
   The X-axis includes future years and years with no data (e.g., 2027), even 
though no corresponding metric values exist.
   
   <img width="503" height="228" alt="Image" 
src="https://github.com/user-attachments/assets/86a70c99-ee1a-4e60-abdc-cfe2402c5eff";
 />
   
   <br><br>
   ### **Impact**
   
   - This causes confusion for users, reduces chart accuracy, and can lead to 
incorrect interpretation of trends by implying future or missing data points.
   - Clear interpretation of year-over-year trends is hindered
   - Forces reliance on dataset-level workarounds (e.g., derived or filtered 
date columns) to control X-axis values
   
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   6.0.0
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


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