Stacked Bar Chart with time scale - multiple issues(0-valued datapoints, time scale ordering)
See original GitHub issueWhat it looks like (false behavior)
My Options
options = {
{
legend: {
display: false
},
maintainAspectRatio: false,
scales: {
xAxes: [{
stacked: true,
title: 'time',
type: 'time',
gridLines: {
lineWidth: 2
},
time: {
unit: 'day',
unitStepSize: 1
},
ticks: {
maxRotation: 0
}
}],
yAxes: [{
stacked: true,
ticks: {
beginAtZero: true
}
}]
}
}
}
My datasets
datasets: [{
label: 'one',
data: [{
x: '2016-12-25',
y: 20
},
{
x: '2016-12-26',
y: 10
}
],
backgroundColor: 'green'
},
{
label: 'two',
data: [{
x: '2016-12-27',
y: 20
},
{
x: '2016-12-28',
y: 10
}
],
backgroundColor: 'red'
}
]
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:7 (1 by maintainers)
Top Results From Across the Web
A Complete Guide to Stacked Bar Charts | Tutorial by Chartio
Stacked bar charts extend the standard bar chart by dividing each bar into multiple subcategories. Learn how to best use this chart type...
Read more >Stacked Bar Charts In Tableau Simplified: The Ultimate Guide ...
This article talks about the Stacked Bar Charts in Tableau and how they are ... charts can be used to directly represent real-time...
Read more >Understanding Stacked Bar Charts: The Worst Or The Best?
In fact, stacked bar charts are supposed to be used to compare total values across several categories and, at the same time, to...
Read more >Clustered and Stacked Column and Bar Charts - Peltier Tech
That wasn't so hard, was it? Though it did take a very long time. Adding a Line to a Clustered-Stacked Column Chart. It's...
Read more >When Are 100% Stacked Bar Graphs Useful? - Perceptual Edge
A 100% stacked bar graph never serves as the best solution for a time series. Stacked segments of bars do not display patterns...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My Chart.js version is 2.7.2.
I actually found out what caused it: You have to have every time point in every dataset and set the ones you don’t use to 0 respectively - like this:
But I don’t think that’s the way it’s supposed to work, because now, when I hover over the bottom, there come the “0” valued tooltips… but at least, the blocks aren’t floating around anymore. And I also ran in #5407 .
So I can’t have
on the first dataset and
on the second.