-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Stacked bar visualisation on 2.6.0 #4430
Comments
@jungleBadger that's actually a bug fix, the 2.6.0 screenshot is the expected result: stacked on y but not on x. I think setting |
@simonbrunel well thats embarrassing! Thank you very much for your answer and sorry about the mistake. (setting X axis to stacked worked as expected) |
I actually didn't upgraded to 2.6.0 again before sampling your suggestion. Worked on 2.5.0 with the following code but 2.6.0 the previous behaviour persists.:
|
The sample code (http://www.chartjs.org/samples/latest/charts/bar/stacked.html) has the window.onload = function() {
var ctx = document.getElementById("canvas").getContext("2d");
window.myBar = new Chart(ctx, {
type: 'bar',
data: barChartData,
options: {
title:{
display:true,
text:"Chart.js Bar Chart - Stacked"
},
tooltips: {
mode: 'index',
intersect: false
},
responsive: true,
scales: {
xAxes: [{
stacked: true,
}],
yAxes: [{
stacked: true
}]
}
}
});
}; On a related tangent, @simonbrunel, has there been any thoughts on adding the code used to create each example into its page (similar to how Chartist provides their examples)? |
Hello @tiesont I've tried with both stacked true and behaviour persists |
@jungleBadger Don't suppose that you could create a jsFiddle (or similar) that reproduces what you're seeing? |
@jungleBadger you need |
@simonbrunel I'll create an issue for that, then. |
Hey Guys I believe you are right about the snippet and I apologize for not doing so. Besides that I can make this work using 2.5.0 only. Even with stacked true on both axes - I will keep looking into it since the fiddle worked. Many thanks. |
This is how @jungleBadger you can still create a fiddle with your code |
After upgrading from chart.js 2.5.0 to 2.6.0 stacked bar visualisations aren't stacking any more - will try to look into chart.js code and make a pull request if successful.
2.5.0
2.6.0
Code
The text was updated successfully, but these errors were encountered: