0

I have a basic histogram chart and need to set xbin to minutes. The examples only show the categorical coordinate strings for months (eg. M1). How do I set it for minutes? Is there a reference to all possibilities? I don't see it on the plot.ly reference page.

Here is a sample pin.io of a histogram: https://codepen.io/nws-jholmberg/pen/oPKOMj

I'm specifically looking to set the "size" value in this section:

  xbins: {
    end: '2016-12-31 12:00', 
    size: 'M1', 
    start: '1983-12-31 12:00'
  }
scader
  • 405
  • 3
  • 8
  • 19

1 Answers1

0

Looking at the code, the binx.size is used as a tickIncrement parameter, which has a convoluted description in the docs, but tl;dr you can set it to milliseconds for histograms, or 60000 (integer, not string) for minutes.

xbins: {
  end: '2016-12-31 12:00', 
  size: 60000, 
  start: '1983-12-31 12:00'
}
scader
  • 405
  • 3
  • 8
  • 19