Skip to content

Vertical singleaxis position#13904

Closed
susiwen8 wants to merge 6 commits into
apache:masterfrom
susiwen8:vertical-singleaxis
Closed

Vertical singleaxis position#13904
susiwen8 wants to merge 6 commits into
apache:masterfrom
susiwen8:vertical-singleaxis

Conversation

@susiwen8
Copy link
Copy Markdown
Contributor

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

The width of rect should have affect on vertical single axis layour.

Fixed issues

Close #13784

Details

Before: What was the problem?

Screen Shot 2020-12-30 at 12 37 15

After: How is it fixed in this PR?

Screen Shot 2020-12-30 at 12 36 20

Usage

Are there any API changes?

  • The API has been changed.

Related test cases or examples to use the new APIs

NA.

Others

Merging options

  • Please squash the commits into a single one when merge.

Other information

@echarts-bot
Copy link
Copy Markdown

echarts-bot Bot commented Dec 30, 2020

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.

@pissang
Copy link
Copy Markdown
Contributor

pissang commented Jan 4, 2021

This change will put the axis in the center of rect, which is not expected I think. The axis should be on the left when vertical, as it should be on the bottom when horizontal.

Also, I noticed the issue is about the NaN value in SVG render mode. I'm not sure about the relationship between this fix and the issue.

@susiwen8
Copy link
Copy Markdown
Contributor Author

susiwen8 commented Jan 11, 2021

Also, I noticed the issue is about the NaN value in SVG render mode. I'm not sure about the relationship between this fix and the issue.

@pissang NaN was cause by missing position for singleAxis

{
    id: idx,
    orient: 'vertical',
    top: 6,
    //bottom:0,
    type: 'category',
    boundaryGap: false,
    data: hours,
    left: idx * (100),
    //height: 80,
    axisLabel: {
        interval: 2
    },
    width: 400,
    position: 'left'
}

@pull-request-size pull-request-size Bot added size/S and removed size/XS labels Mar 2, 2021
@susiwen8
Copy link
Copy Markdown
Contributor Author

susiwen8 commented Mar 2, 2021

This change will put the axis in the center of rect,

@pissang The simple way to solve this issue it's add a new option offset to control singleAxis. Just like grid which has no affect on singleAixs. This option would give user ability to control singleAixs layout

PS: only for vertical axis now, if you think this were worthy, I'll continue.

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.

vertical orientation breaks singleAxis charts

2 participants