Multiple Buttons and "Zero" n_clicks - "Paging Plots"

Hello All,

Let’s see if anyone can help me
I have a very large dataframe and I want to plot a bar graph for every 15 rows. It is associated with 4 buttons:

  • next 15
  • preveious 15
  • start
  • end

The previous and next buttons work ok until I click start or end because, of course, the n_clicks for previous and next button don’t change.

So, imagine I’ am on page 5 (n_clicks=5) of my graph with rows [75:90]. When I press start it goes to start of the dataframe [0:15] but if I click next again it will show rows [90:105] because my n_clicks is 6.

I hope I explained myself. :slight_smile:

The question is: how to put the n_clicks back to zero when pressing ‘start/end’ buttons? Or something related, a workaround or even another idea of showing this large df in bar plots.

Thank you,

Paula Romero