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(bar): barMinHeight not working for stacked bars #18327

Closed
wants to merge 3 commits into from
Closed

Conversation

Ovilia
Copy link
Contributor

@Ovilia Ovilia commented Mar 3, 2023

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

#16338 seems to bring a bug that the first series's barMinHeight is not stacked with the second series, so that the base of the second series is barMinHeight.

Fixed issues

#16565

Details

Before: What was the problem?

If there are three series with all data as 0 and barMinHeight as 15, the three series are at the same position.

image

After: How does it behave after the fixing?

They should be stack on each other, which is the behavior before #16338.

image

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

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

Other information

@echarts-bot
Copy link

echarts-bot bot commented Mar 3, 2023

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.

@Ovilia Ovilia marked this pull request as draft March 3, 2023 09:52
@Arhimondear
Copy link

Hello! Is there any news about this fix?

@Arhimondear
Copy link

Hello! Is there any news about this fix?

@Ovilia help, plz :)

@Ovilia
Copy link
Contributor Author

Ovilia commented Apr 7, 2023

@Arhimondear This problem remains to be fixed because it is complicated. You may use 5.2.x if you are urgent.

@Ovilia
Copy link
Contributor Author

Ovilia commented Jun 20, 2024

This PR is closed due to the fact that by supporting minHeight for stacked bars, it brings a misunderstanding of the total height.

@Ovilia Ovilia closed this Jun 20, 2024
@Ovilia Ovilia deleted the fix-16565 branch June 20, 2024 09:39
@chenxingshuang
Copy link

chenxingshuang commented Jul 22, 2024

This PR is closed due to the fact that by supporting minHeight for stacked bars, it brings a misunderstanding of the total height.

configing minHeight is still not working

option = {
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      // Use axis to trigger tooltip
      type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
    }
  },
  legend: {},
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: {
    type: 'value'
  },
  yAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  series: [
    {
      name: 'Direct',
      type: 'bar',
      stack: 'total',
      label: {
        show: true
      },
      emphasis: {
        focus: 'series'
      },
      minHeight: 560,  // This is my configuration 「minHehgit」
      data: [0, 302, 301, 334, 390, 330, 320]
    },
    {
      name: 'Mail Ad',
      type: 'bar',
      stack: 'total',
      label: {
        show: true
      },
      emphasis: {
        focus: 'series'
      },
      data: [120, 132, 101, 134, 90, 230, 210]
    },
    {
      name: 'Affiliate Ad',
      type: 'bar',
      stack: 'total',
      label: {
        show: true
      },
      emphasis: {
        focus: 'series'
      },
      data: [220, 182, 191, 234, 290, 330, 310]
    },
    {
      name: 'Video Ad',
      type: 'bar',
      stack: 'total',
      label: {
        show: true
      },
      emphasis: {
        focus: 'series'
      },
      data: [150, 212, 201, 154, 190, 330, 410]
    },
    {
      name: 'Search Engine',
      type: 'bar',
      stack: 'total',
      label: {
        show: true
      },
      emphasis: {
        focus: 'series'
      },
      data: [820, 832, 901, 934, 1290, 1330, 1320]
    }
  ]
};

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.

None yet

3 participants