snukhulov opened a new pull request, #19279: URL: https://github.com/apache/echarts/pull/19279
<!-- Please fill in the following information to help us review your PR more efficiently. --> ## Brief Information This pull request is in the type of: - [ ] bug fixing - [x] new feature - [ ] others ### What does this PR do? Add min-max sampler function <!-- USE ONE SENTENCE TO DESCRIBE WHAT THIS PR DOES. --> ## Details ### Before: What was the problem? In some cases min-max sampling algorithm fit line date more naturally then the existing ones. For example, for a sine with a lot of data points min-max sampler is the best choice. Example. The original sine without samplers (200 000 data points). <img width="978" alt="Снимок экрана 2023-11-07 в 00 42 48" src="https://github.com/apache/echarts/assets/36777577/e27d03bc-d0f8-45fe-84ae-4bec09168be8"> Using 'average' sampler <img width="971" alt="Снимок экрана 2023-11-07 в 00 44 15" src="https://github.com/apache/echarts/assets/36777577/a7e1255e-73c9-4b69-af0a-e9d29aebfb93"> Using 'lttb' sampler <img width="965" alt="Снимок экрана 2023-11-07 в 00 43 58" src="https://github.com/apache/echarts/assets/36777577/a97cbc66-c690-4246-8857-e9455c8a5c5a"> Using 'max' sampler <img width="970" alt="Снимок экрана 2023-11-07 в 00 43 39" src="https://github.com/apache/echarts/assets/36777577/b6707406-d1b3-462f-a05f-a35f46c8279d"> Using 'min' sampler <img width="971" alt="Снимок экрана 2023-11-07 в 00 43 18" src="https://github.com/apache/echarts/assets/36777577/eaaa0d1f-da6e-4aa2-aab5-2a491384fefb"> ### After: How does it behave after the fixing? Using new 'minmax' sampler <img width="972" alt="Снимок экрана 2023-11-07 в 01 08 29" src="https://github.com/apache/echarts/assets/36777577/d10be4b9-d553-44cf-8c90-14f9a0f55e84"> ## 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 ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs N.A. ## Others ### 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]
