Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: improvement and some fix of bar-race (realtimeSort) #13994

Merged
merged 2 commits into from Jan 9, 2021
Merged

Conversation

100pah
Copy link
Member

@100pah 100pah commented Jan 9, 2021

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

  • Clip:
    • if a bar element is totally clipped (marked as el.ignore: true), place the element at the edge of the coordinate system bounding rect with width/height 0. Because if data changed and the element show again, the transition animation of this element will start at this place.
    • Fix realtimeSort clip issue #13677.
  • Previously when base axis is x, the initial sort is different from the subsequent sort. Fixed it.
  • Remove the transition animation of the baseAxis init state to the first sorted state.
  • Fix that throw error when series data does not cover all axis category.
  • Fix some incorrect logic like:
    • BarView sortMap input param
    • OrdinalScale['scale']
    • OrdinalScale['getTicks']
  • Simplify and clarify the params sortInfo of action "changeAxisOrder".
    // before:     
    sortInfo: [         
        // `beforeSortIndex` is not easy to understand and not necessary.         
        { ordinalNumber: 2, beforeSortIndex: 4 },         
        { ordinalNumber: 5, beforeSortIndex: 5 },         
        { ordinalNumber: 3, beforeSortIndex: 0 },         
        { ordinalNumber: 4, beforeSortIndex: 2 },         
        { ordinalNumber: 0, beforeSortIndex: 3 },         
        { ordinalNumber: 1, beforeSortIndex: 1 },     
        ]     
        // after:     
    sortInfo: {         
        ordinalNumbers: [2, 5, 3, 4, 0, 1]     
    }     
  • some small refactor: naming, code organization, type. Add comments.

…), place the element at the edge of the coordinate system bounding rect with width/height 0. Because if data changed and the element show again, the transition animation of this element will start at this place.
+ When base axis is x, the initial sort should not be different from the subsequent sort.
+ Remove the transition animation of the baseAxis init state to the first sorted state.
+ Fix that throw error when series data does not cover all axis category.
+ Fix some incorrect logic like:
    + BarView sortMap input param
    + OrdinalScale['scale']
    + OrdinalScale['getTicks']
+ Simplify and clarify the params `sortInfo` of action "changeAxisOrder".
    ```js
    // before:
    sortInfo: [
        // `beforeSortIndex` is not easy to understand and not necessary.
        { ordinalNumber: 2, beforeSortIndex: 4 },
        { ordinalNumber: 5, beforeSortIndex: 5 },
        { ordinalNumber: 3, beforeSortIndex: 0 },
        { ordinalNumber: 4, beforeSortIndex: 2 },
        { ordinalNumber: 0, beforeSortIndex: 3 },
        { ordinalNumber: 1, beforeSortIndex: 1 },
    ]
    // after:
    sortInfo: {
        ordinalNumbers: [2, 5, 3, 4, 0, 1]
    }
    ```
+ some small refactor: naming, code organization, type. Add comments.

Test cases:
test/bar-race.html
test/bar-race2.html
@echarts-bot
Copy link

echarts-bot bot commented Jan 9, 2021

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@100pah 100pah merged commit 6586c99 into master Jan 9, 2021
@echarts-bot
Copy link

echarts-bot bot commented Jan 9, 2021

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@100pah 100pah deleted the fix/bar-race branch January 9, 2021 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

realtimeSort clip issue
2 participants