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

The chart columns overflow the grid area for a stacked bar chart with logarithmic Y axis #10374

Closed
ciukstar opened this issue Apr 27, 2019 · 6 comments
Labels
bug en This issue is in English stale Inactive for a long time. Will be closed in 7 days.

Comments

@ciukstar
Copy link

Version

4.2.1

Steps to reproduce

option = {
title: {
text: '对数轴示例',
left: 'center'
},
tooltip: {
trigger: 'item',
formatter: '{a}
{b} : {c}'
},
legend: {
left: 'left',
data: ['2的指数', '3的指数']
},
xAxis: {
type: 'category',
name: 'x',
splitLine: {show: false},
data: ['一', '二', '三', '四', '五', '六', '七', '八', '九']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
yAxis: {
type: 'log',
name: 'y'
},
series: [
{
name: '3的指数',
type: 'bar',
stack: 'one',
data: [1, 3, 9, 27, 81, 247, 741, 2223, 6669],
label: {
normal: {
show: true,
position: 'insideTop'
}
}
},
{
name: '2的指数',
type: 'bar',
stack: 'one',
data: [1, 2, 4, 8, 16, 32, 64, 128, 256],
label: {
normal: {
show: true,
position: 'insideTop'
}
}
},
{
name: '1/2的指数',
type: 'bar',
stack: 'one',
data: [1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512],
label: {
normal: {
show: true,
position: 'insideTop'
}
}
}
]
}

What is expected?

Columns do not overflow

What is actually happening?

Columns overflow

@echarts-bot
Copy link

echarts-bot bot commented Apr 27, 2019

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for-help labels Apr 27, 2019
@ciukstar
Copy link
Author

ciukstar commented May 3, 2019

stacked-col-logarithmic-y-demo

@qroft
Copy link

qroft commented May 3, 2019

I can confirm this.
I am having the same issue with the horizontal stacked bar.
I have added this line to my grid so that i can see that my bar goes bigger than the grid.
stacked-bar-bug

@qroft
Copy link

qroft commented May 3, 2019

If i found out correctly, the chart does not calculate the maximum value of all stacked bars.
First i added this to my xAxis
max: 'dataMax'
And the layout was broken again.
Then i manually calculated the sum of all my bars and added this:
max: 14.05

With the latter, my stacked bar looks correct like it should.

My temporaray solution: calculate the sum of all values in a variable and add that variable like this:
max: myItemsSum

@Ovilia Ovilia removed pending We are not sure about whether this is a bug/new feature. waiting-for-help labels May 5, 2019
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2021

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

@github-actions github-actions bot added the stale Inactive for a long time. Will be closed in 7 days. label Sep 7, 2021
@github-actions
Copy link
Contributor

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants