fix(axis): fix axis label may have inappropriate precision or take too much unexpected space when alignTicks is enabled#21430
Open
plainheart wants to merge 33 commits intoreleasefrom
Open
fix(axis): fix axis label may have inappropriate precision or take too much unexpected space when alignTicks is enabled#21430plainheart wants to merge 33 commits intoreleasefrom
alignTicks is enabled#21430plainheart wants to merge 33 commits intoreleasefrom
Conversation
…o much unexpected space when `alignTicks` is enabled
|
Thanks for your contribution! The pull request is marked to be |
Contributor
|
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-21430@eb45d17 |
|
@plainheart 请问这个mr后续会回合到 5.x 版本吗 |
…ore case for dataZoom edge cases.
…ils and solutions.
… Make the rounding result consistent between dataZoom calculated window and specified axis `determinedMin/Max`. (3) Fix unexpected behaviors when dataZoom controls axes with `alignTicks: true` - previous they are not precisely aligned and the ticks jump significantly due to inappropriate rounding when dataZoom dragging.
Member
Author
|
@nuteu 除非有安全性问题,通常不会再更新旧版本。若有需求,可以考虑使用 patch-package 工具制作一个补丁。 |
…s data may be out of the calculated extent and can not be displayed. (2) Previously the precision is incorrect for small float number (fixed at 10 rather than based on the magnitude of the value). (3) Make the tick precision more acceptable when min/max of axis is fixed, and remove console warning, because whey can be specified when dataZoom dragging. (4) Clarify the related code for LogScale.
…ayout. (3) Remove unreasonable clamp in Interval calcNiceExtent, and clarify the definition of `_niceExtent`.
Member
…cNiceTicks` and `calcNiceExtent` from Scale class override member functions to plain functions, similar to `axisAlignTicks`. Previously it's hard to modify and error-prone. (2) Remove unnecessary override on Scale class hierarchy and limit override usage, which is difficult to understand and error-prone. (3) Simplify the inheritance - shift `LogScale` and `TimeScale` inheritance from `IntervalScale` to `Scale`. (4) Clarify the impl of `IntervalScale` - uniform the parameters setting entry for both "nice ticks" and "align ticks".
…om Scale; unify union entry and scaleRawExtentInfo creator and cache to avoid error-prone impl; simplify the impl of coord sys call extent uinon. (2) Fix LogScale precision bug introduced by previous commits.
…sitive data on LogScale - exclude non-positive series data items when calculate dataExtent on LogScale. (2) Include `Infinite` into `connectNulls` handling on line series; the `Infinite` value may be generated by `log(0)` and previously the corresponding effect in unpredictable on line series (sometimes display as connected but sometimes not).
…xes extent can not union pie center automatically. Commit 18a23a8 has supported it. This commit updates test cases.
… 'dragging'). (2) Fix dataZoom bug that data info disappear when drag release on the area that data info display should be triggered.
(1) Uniform series data union logic; previous they are implemented in several inconsistent ways and error-prone. And also strict the extent calculation with uniformed utilities. (2) Refactor Scale - uniform the implementation of the numeric transformations (such as axis breaks, logarithm, ordinal related handling) with a decorator pattern and decouple them from Scale class hierarchy. This brings consistent handling for details and enables further extension. (3) Refactor Scale - decouple "axis nice" logic from Scale and make the "axis nice" and "axis align" implemented in the same code style. This removes override (hard to read and maintain), and uniforms the parameters of IntervalScale (previous its parameters can be generated by itself or outside, which is confusing), and reduce scale-type-specified handling (e.g., if (isLogScale) ...) in calculation. (4) Enable "value" axis and "log" axis to render "bar" and "pictorialBar" series without overflowing the axis. Previously only "time" axis enables that on only "bar" series. Introduce "SCALE_EXTENT_KIND_MAPPING" to cover this generalized behavior and use strict "clip" for bar series without extra margin (a previous compromise). And clarify `barGrid` code accordingly, which removes duplicated time-consuming calculation in "bandWidth" calculation. Close #19972. Close #17858. Close #12720. Close #13321. Close #20718. Close #20421. Close #20503.
# Conflicts: # src/chart/bar/BarView.ts # src/chart/treemap/treemapLayout.ts
…nable and error-prone for small float number.
…on changed. (2) Fix onZero on double value axis and dataZoom is applied on a base axis - onZero should be disabled by default.
(1) feature: Enable uniform bandWidth calculation in numeric axis (e.g., for tooltip shadow); it previously only applicable to category axis, but buggy in numeric axis with bar series. And enable the clip of tooltip shadow. (2) refactor: Introduce a dedicated workflow phase for series aggregation and data statistics computation on a single axis, allowting the results to be reused across multiple features. (3) fix: Fix duplicate ticks in TimeScale and customValues, which cause jitter of splitArea. (4) fix: Fix category showMin/MaxLabel handling when step > 1 and showMin/MaxLabel: false (5) chore: Tweak bad effects introduced by the previous implementation of SCALE_EXTENT_KIND_MAPPING. (6) chore: Clean some code.
(1) feature: Add option boxplot.clip (2) feature: Enable boxplot and candlestick containShape for "value"/"time"/"log" axis, enable proper shadow axisPointer. (candlestick-case.html, boxplot-multi.html) (3) fix: Fix candlestick ends shapes can not be displayed on "value"/"time" axis. (candlestick-case.html) (4) fix: candlestick shape width is inappropriate when datazoom filterMode is 'none'/'empty'. (candlestick-case.html) (5) fix: In polar coordinate system, support "value"/"time" axis as angle/radius axis, enable propere bandWidth for bar series, enable proper shadow axisPointer. (bar-polar-multi-series-radial.html, bar-polar-multi-series.html)
…th axes are value axes.
…EC_CYCLE. (2) Fix dataZoom in `appendData`, introduced by recent commits.
…Data is executed. And clarify the usage of appendData in comments.
…ways displayed even if not required. See #21176 .
…remove DataZoom feature.
…2) Restrict the triggering of hoverLayer to only canvas renderer.
…to update when mousewheel, since dataZoomInside can modify views on mousewheel, and cause highlighted element to be not able to restore. (2) Fix axisPointer highlighted item can not restore due to outdated dataIndexIndex.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.














Brief Information
This pull request is in the type of:
What does this PR do?
This PR is to fix the following issues when
alignTicksis enabled:Fixed issues
Comparison
Document Info
One of the following should be checked.
Misc
Security Checking
ZRender Changes
Related test cases or examples to use the new APIs
See the 6th/7th/8th test cases in
test/axis-align-ticks.htmlMerging options
Other information