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

   ## 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 monotone cubic Hermite smoother for cartesian line and area 
series.
   
   ### Fixed issues
   
   - https://github.com/apache/echarts/issues/21793
   - https://github.com/apache/echarts/issues/21532
   
   ## Details
   
   ### Before: What was the problem?
   
   `smooth: true` can bow past the samples. `smoothMonotone: 'x'` and `'y'` 
avoid that by flattening the tangent at every sample, which draws a saddle or 
plateau at each knot (#21532, #7158).
   
   ### After: How does it behave after the fixing?
   
   `smoothMonotone: 'monotoneX'` and `'monotoneY'` use Fritsch–Butland 
tangents, so the curve passes through the samples without adding extrema 
between them. `smooth: true` is full strength in this mode; a number in `(0, 
1]` scales the tangents. The default and the existing `'x'`, `'y'`, and 
`'none'` modes are unchanged. On polar series the new values fall back to the 
current Bézier smooth.
   
   ## Document Info
   
   - [ ] 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/ut/spec/chart/line/monotoneCubic.test.ts`
   - `test/line-monotone.html`
   
   ### Merging options
   
   - [x] Please squash the commits into a single one when merging.
   
   ### Other information
   
   Interior slopes are [Fritsch–Butland 
(1984)](https://doi.org/10.1137/0905021), inside the [Fritsch–Carlson monotone 
region (1980)](https://doi.org/10.1137/0717021). [Steffen 
(1990)](https://doi.org/10.4236/apm.2018.81003) is the d3/Vega alternative and 
can replace the tangent function without an API change if that look is 
preferred.


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