Skip to content

[Bug] when axis zero is false, bar grow animation does not start from the bottom axes #3808

@purpose233

Description

@purpose233

Version

1.13.5

Link to Minimal Reproduction

null

Steps to Reproduce

const spec = {
  type: 'bar',
  xField: 'x',
  yField: 'y',
  axes: [
    {
      orient: 'left',
      zero: false
    },
    {
      orient: 'bottom',
      sampling: false,
      label: {
        autoHide: true,
        autoHideMethod: 'greedy',
        autoHideSeparation: 10,
      }
    }
  ],
  data: [
    {
      name: 'bar',
      fields: {
        y: {
          alias: 'sales'
        }
      },
      values: [
        {
          x: '2021-12-21 2:00',
          y: 82
        },
        {
          x: '2021-12-21 4:00',
          y: 50
        },
        {
          x: '2021-12-21 6:00',
          y: 64
        },
        {
          x: '2021-12-21 8:00',
          y: 30
        },
        {
          x: '2021-12-21 10:00',
          y: 40
        },
        {
          x: '2021-12-21 12:00',
          y: 40
        },
        {
          x: '2021-12-21 14:00',
          y: 56
        },
        {
          x: '2021-12-21 16:00',
          y: 40
        },
        {
          x: '2021-12-21 18:00',
          y: 64
        },
        {
          x: '2021-12-21 20:00',
          y: 74
        },
        {
          x: '2021-12-21 22:00',
          y: 98
        }
      ]
    }
  ]
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;

Current Behavior

Image

Expected Behavior

correct start position for bar grow animation

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions