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

Logarithmic stacked bar charts don't draw the first dataset #3585

Closed
potatopeelings opened this issue Nov 12, 2016 · 5 comments
Closed

Logarithmic stacked bar charts don't draw the first dataset #3585

potatopeelings opened this issue Nov 12, 2016 · 5 comments

Comments

@potatopeelings
Copy link
Contributor

Current Behavior

With axis stacked, the first dataset is not plotted.

untitled

Steps to Reproduce (for bugs)

  1. bar type
  2. 2 datasets
  3. y axis stacked and logarithmic (x axis needs to be stacked too, otherwise the bars won't stack)

Fiddle

https://jsfiddle.net/x7pz253f/

Version

Chart.js version: 2.3.0

@etimberg
Copy link
Member

The weird thing is that I can get a tooltip for the dataset that doesn't draw 😕

jeffcarey added a commit to jeffcarey/Chart.js that referenced this issue Nov 17, 2016
…to take log of 0, resulting in no bars drawn)
@xmmwc
Copy link

xmmwc commented Nov 24, 2016

https://jsfiddle.net/x7pz253f/1/

same but not the first dataset

I found it just many '65' in my case.but i just need that many '65' and want to draw it.

@xmmwc
Copy link

xmmwc commented Nov 24, 2016

i found out what is wrong;

i got max value 66 and min value 65 in my datasets

but i did not set ticks.beginAtZero to true.

so it draw 65 with top=0.

i think is good to have a min top that value is not true zero

@xmmwc
Copy link

xmmwc commented Nov 24, 2016

@potatopeelings you can set your data to [1000,100];

that make less distance between two values which can draw the bar

or use beginAtZero.

but i don't think this is good idea

https://jsfiddle.net/x7pz253f/3/

@potatopeelings
Copy link
Contributor Author

@xmmwc - unfortunately that won't fix my issue. It's due to stacked bar charts starting from the value 0 and the fact that a logarithmic axis can't plot 0 (see jeffcarey's fix)

I believe the issue you are having is related to #3132.

etimberg added a commit that referenced this issue Mar 11, 2017
…issue, #3585 while also fixing the issue identified for normal stacked charts when the Y axis has a user defined minimum value
etimberg added a commit that referenced this issue Mar 18, 2017
…e axis has a user defined minimum value.
etimberg added a commit that referenced this issue Mar 21, 2017
* Undo fix for #3585 since it has broken the stacked bar charts when the axis has a user defined minimum value.

* When a value of 0 is requested for a vertical logarithmic axis, return the bottom point
roicos pushed a commit to roicos/Chart.js that referenced this issue Aug 21, 2017
* Undo fix for chartjs#3585 since it has broken the stacked bar charts when the axis has a user defined minimum value.

* When a value of 0 is requested for a vertical logarithmic axis, return the bottom point
exwm pushed a commit to exwm/Chart.js that referenced this issue Apr 30, 2021
* Undo fix for chartjs#3585 since it has broken the stacked bar charts when the axis has a user defined minimum value.

* When a value of 0 is requested for a vertical logarithmic axis, return the bottom point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants