title: Bokeh Slider custom JS callback
body: <p>I am new to Bokeh and trying to implement a Slider callback using CustomJS. I have my sales data grouped by years, months, days. Based on the slider value(1-12), my monthly data has to be changed on the plot. Below is my code for this:
  Slider values(0-12)- Months numbers
  X-axis: Days(1-30)
  y-axis:Sales</p>
  
  <pre><code>df3=df
  
  
  df3['Date2'] = pd.to_datetime(df['Inv Date'])
  df3.set_index('Date2', inplace=True)
  
  
  df3['month'] = df3.index.month
  df3['year'] = df3.index.year
  df3['day'] = df3.index.day
  
  df3['Dateday'] = pd.to_datetime(df3[['year','month', 'day']])
  
  source1=df3.groupby(['year','month','day'], as_index = False).sum()
  
  current_month=ColumnDataSource(source1[source1['year']== dt.now().year])
  
  
  hover3 = HoverTool(
          tooltips = [
              ('day', '@day'),
              ('Sales','@{Sales}{0,0}'),
              ],
          formatters = {
              'day': 'datetime',
              'Sales': 'numeral'}
         )
  
   p =  figure(
   title='YEARLY SALES',  
   plot_width=600, 
   plot_height=400, 
   min_border=3,
  
  tools = [hover3,'box_zoom','wheel_zoom', 'pan','reset'],  
  toolbar_location="above")
  p.vbar(x='day', top='Sales', width=0.2, color='#e8bc76', 
  source=current_month)
  p.xaxis.axis_label = 'Day'
  p.xaxis.axis_label_text_font_style = 'normal'
  p.xaxis.axis_label_text_font_size = '12pt'
  p.yaxis[0].formatter = NumeralTickFormatter(format="0,0")
  
  
  
  
  callback = CustomJS(args=dict(source=current_month), code="""       
          var f = slider.get('value');
          var data = source.data; 
  
          data1=current_month[current_month['month']== f]
          day=data1[data1['day']]
          Sales=data1[data1['Sales']]
  source.trigger('change');
      """)
  slider = Slider(start=1, end=12, value=1, step=1, title="power",             
  callback=callback)
  
  layout = column(slider, p)
  
  show(layout)
  </code></pre>
  
  <p>Can anyone please help me out. I am stuck here on filtering my dataframes based on the Custom Callbacks. </p>