TargetProcess/tauCharts

Bars on same timestamp overlaps

Opened this issue · 3 comments

vjoao commented

I am trying to use a bar chart with a dataset of different classes at the same timestamp.

data: [{
  timestamp: X,
  class: 'A'
},
{
  timestamp: X,
  class: 'B'
},
{
  timestamp: X + 15 min,
  class: 'A'
},
{
  timestamp: X + 15 min,
  class: 'B'
}]

When timestamps are dates, the bars overlap themselves. But when I convert the timestamps to strings, say formatting as HH:mm:ss, they are set side by side, which is how I want them to be.

current:
image

expected:
image

The same problem

Hi @vjoao! Looks like you need specify dimension type for timestamp field.
I made some expample https://jsfiddle.net/n9aknof0/28/
More about dimensions https://api.taucharts.com/datasource/index.html

vjoao commented

Hey @Mavrin, this works great! It is quite hard to find in the docs, though. Different behaviors for different data types on an axis makes me think this is a bug.
Thanks for the effort.