msyavuz opened a new pull request, #41334:
URL: https://github.com/apache/superset/pull/41334

   ### SUMMARY
   
   The default ECharts line chart left-joins each time-shifted comparison 
series onto the *current* period's rows, so a historical series gets truncated 
to wherever the main series ends (e.g. today's partial day). The deprecated 
NVD3 line chart kept comparison series at their full range — which users relied 
on for intraday "today vs prior days" overlays.
   
   This adds an opt-in **Show full range for time shift** control (Data → 
Advanced analytics → Time comparison). When enabled, offset series are 
outer-joined and their x-axis rebuilt so each comparison line spans its full 
period while the current-period line stops at its last data point. Default off 
— existing behavior is byte-for-byte unchanged. The option is wired only into 
the regular timeseries query builder, so it is hidden on Mixed charts where it 
would be a no-op.
   
   ### BEFORE/AFTER
   
   - **Before / option off:** the historical comparison line stops where the 
main series stops.
   - **After / option on:** the historical (dotted) line spans the full prior 
period; the current-period line still stops at its last data point.
   
   ### TESTING INSTRUCTIONS
   
   - Line chart on an intraday dataset: time-column X-axis, Hour grain, Time 
shift = `1 day ago`. Toggle **Show full range for time shift**: off → both 
lines end together; on → the comparison line continues to end of the prior day. 
The `/api/v1/chart/data` response gains trailing rows where the main metric is 
`null` and the `… 1 day ago` metric is populated.
   - `pytest tests/unit_tests/common/test_time_shifts.py` (new cases cover 
full-range on vs off).
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue: No
   - [ ] Required feature flags: No — gated entirely by the per-chart control, 
default off
   - [x] Changes UI — adds one checkbox under Advanced analytics → Time 
comparison
   - [ ] Includes DB Migration: No — backend adds an optional query field only
   - [x] Introduces new feature or API — new `time_compare_full_range` 
query-object field + control
   - [ ] Removes existing feature or API: No
   


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