title: Getting undefined in xaxis Histogram Bokeh/Python when applying FuncTickFormatter
body: <p>Getting "Undefined" on Bokeh xaxis(Histogram) using FuncTickFormatter in Python </p>
  
  <p>I have tried formatting the date to a list and running it through FuncTickFormatter in python; I have equally tried placing my date as index and still get same problem. I am new to using bokeh. Thanks a lot for the help.</p>
  
  <pre><code>arr_df.head()
  
      dateL          count  left  right  f_count    f_interval
  0   2022-12-29       1    1424  1458     1      1424 to 1458
  1   2023-02-02       3    1458  1492     3      1458 to 1492 
  2   2023-03-08       3    1492  1527     3      1492 to 1527
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>dicaxis1 = arr_df['dateL'].to_dict()
  
  p = figure(plot_width = 500, plot_height = 500)
  
  select_axis_key = range(0, len(arr_df), 1)
  select_axis = {k:v for (k,v) in dicaxis1.items() if k in select_axis_key}
  
  p.xaxis.ticker = FixedTicker(ticks=select_axis_key)
  p.xaxis.formatter = FuncTickFormatter(code="""var labels = {}; return labels[tick];""" % select_axis)
  
  r = p.quad(bottom=0, top='count', left='datel', right='dater', source=arr_src,
         fill_color='red', line_color='black')
  
  styled_p = style(p)
  
  hover = HoverTool(tooltips = [('Duration', '@f_interval'),
                                ('Numb. of Phases', '@f_count')])
  styled_p.add_tools(hover)
  
  show(styled_p)
  </code></pre>
  
  <p>TypeError: Object of type 'range' is not JSON serializable</p>
  
  <p><a href="https://i.stack.imgur.com/2qDON.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2qDON.jpg" alt="enter image description here"></a></p>