You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use a stacked bar chart and xAxis.type is time. I expect bars to be stacked when on the same t value (the data looks like {t: new Date(…), y: … }. If some data point is the only one at that time I expect no stacking. I also expect the bars of the datasets to have the same width.
Current Behavior
The bars seem to be stacked by their index in data (check how tooltip highlights the bars in pic below, and how the blue ones are flying in level with green at same index) but placed according to their t (time). Somehow the width of bars are also affected. The blue data exist on times where the green one does not (see JSBin below).
Possible Solution
I am not sure here, I imagine a solution that truly checks the time and all as quite complicated. Could we stack the bars with regards to time, and not index? Time and dates in Javascript have nice operands, eg. two Date-objects can be compared with == and > etc.
Expected Behavior
I use a stacked bar chart and
xAxis.type
istime
. I expect bars to be stacked when on the samet
value (the data looks like{t: new Date(…), y: … }
. If some data point is the only one at that time I expect no stacking. I also expect the bars of the datasets to have the same width.Current Behavior
The bars seem to be stacked by their index in data (check how tooltip highlights the bars in pic below, and how the blue ones are flying in level with green at same index) but placed according to their
t
(time). Somehow the width of bars are also affected. The blue data exist on times where the green one does not (see JSBin below).Possible Solution
I am not sure here, I imagine a solution that truly checks the time and all as quite complicated. Could we stack the bars with regards to time, and not index? Time and dates in Javascript have nice operands, eg. two
Date
-objects can be compared with==
and>
etc.Steps to Reproduce (for bugs)
Check jsbin.
Context
I was working with stacking data coming from certain times. Made an example where the two datasets to be stacked did not both exist on all timestamps.
Environment
2.8.0/Chart.bundle.min.js
from CDNThe text was updated successfully, but these errors were encountered: