nextchamp-saqib opened a new pull request, #21783:
URL: https://github.com/apache/echarts/pull/21783

   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   ### What does this PR do?
   
   Stops a time axis from adding a stray day tick just after each month start.
   
   ### Fixed issues
   
   None filed.
   
   ## Details
   
   ### Before: What was the problem?
   
   With about 120 days of daily data, the day level uses a 16-day interval. 
`addTicksInSpan` pushes one extra tick past each month span so the next level 
can be computed, but only drops it when it passes `extent[1]`. So June 17 + 16 
= July 3 stays in the final ticks:
   
   ```
   Jun 9, Jun 17, Jul 1, Jul 3, Jul 17, Aug 1, Aug 2, Aug 17, Sep 1, Sep 2, Sep 
17, Oct 1, Oct 3, Oct 6
   ```
   
   July 3 sits two days from July 1, so with `hideOverlap` the month label is 
often the one hidden and the axis reads `17 3 17 2 17 2`.
   
   ### After: How does it behave after the fixing?
   
   The extra tick is also marked `notAdd` once it passes the span end 
(`maxTimestamp`). That end is a tick of the level above, so nothing is lost:
   
   ```
   Jun 9, Jun 17, Jul 1, Jul 17, Aug 1, Aug 17, Sep 1, Sep 17, Oct 1, Oct 6
   ```
   
   ## Document Info
   
   One of the following should be checked.
   
   - [x] This PR doesn't relate to document changes
   - [ ] The document should be updated later
   - [ ] The document changes have been made in apache/echarts-doc#xxx
   
   ## Misc
   
   ### Security Checking
   
   - [ ] This PR uses security-sensitive Web APIs.
   
   ### ZRender Changes
   
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ### Related test cases or examples to use the new APIs
   
   `test/ut/spec/scale/time.test.ts`
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merging.
   
   ### Other information
   


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