awtaylor opened a new pull request, #21797:
URL: https://github.com/apache/echarts/pull/21797

   ## Brief Information
   
   This pull request is in the type of:
   
   - [ ] bug fixing
   - [x] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   Add an opt-in per-datum smoothing seam so a line stays connected but 
smoothing restarts at that vertex.
   
   
   
   ### Fixed issues
   
   - https://github.com/apache/echarts/issues/21796
   
   
   ## Details
   
   ### Before: What was the problem?
   
   `smooth: true` uses samples on both sides of a vertex when it places control 
points. A series that is one legend entry and one axis tooltip cannot keep a 
real join, such as history against a forecast, from being rounded through. 
Splitting the series in two splits the legend and the tooltip.
   
   `null` with `connectNulls: false` already lifts the pen. `markLine` only 
annotates. This is a corner, not a gap.
   
   
   
   ### After: How does it behave after the fixing?
   
   
   `{ value: 80, smoothBreak: true }` keeps the vertex on the stroke and 
restarts smoothing there. Each side is smoothed as if that vertex were the end 
of the piece. The default series is unchanged.
   
   The flag is read only from a `series.data` object. Numbers, `[x, y]` tuples, 
and dataset rows cannot carry it. `step` ignores it, because stepping rebuilds 
the point list. A seam on a sample that `sampling` drops disappears with that 
sample. The stacked area seams the top edge of this series only, not the 
baseline from another series. During an update, the flag stays on the morphed 
vertex and uses the target datum for the whole animation.
   
   `smoothMonotone: 'x'` and `'y'` already use an axis-aligned tangent at every 
sample, so a seam often does not change those modes. The visual case uses 
`smooth: true`.
   
   ## Document Info
   
   One of the following should be checked.
   
   - [ ] This PR doesn't relate to document changes
   - [x] 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/line-smooth-break.html`
   - `test/ut/spec/chart/line/smoothBreak.test.ts`
   
   ### Merging options
   
   - [x] Please squash the commits into a single one when merging.
   
   ### Other information
   
   The name `smoothBreak` is open to change. It is not a gap.


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