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 50 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 50 commits intoreleasefrom
alignTicks is enabled#21430plainheart wants to merge 50 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.
…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.
…dering was broken by Doji feature. (2) Fix bar large and progressive might throw NPE. (3) Follow the fixing of progressive rendering in zrender#1151 (3) Fix parallels did not clear previous rendered content when switching between progressive and normal mode. (4) Fix that chart.on('finished') event might not be called in some edge case (when multiple iterations are executed in one frame at the end).
…howMinLabel/showMaxLabel did not control label and ticks on axis edges, but controls the filtered labels by axisLabel.interval settings. This impl did not align with the intent of that option.
…emove unnecessary code. Fix relevant TS.
… scale sorting. Fix axis label and sorting bug introduced by preceding commits.
…p: false - use the newly added containShape handler. (2) Fix regression: Drop the previous containShape strategy on bar series, use a simple strategy for better compatibility. (3) Fix regression: Fix new added bar clip feature on single data item case. (4) Fix regression: Clarify code.
…ible. (2) Default IntervalScale extent on single data item case show not be broken. (3) LogScale filter non-positive value.
…. (2) Fix regression - containShape should be word properly in single value case. And simply the code.
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