I've created a simple Flask app that has a Chart.js bar chart and a data table below it. See below:
(Live view:https://flaskapp.gullp.repl.co/)
My particular bar chart counts the number of items for each label.
My question: how would I go about making an onclick chart.js event that updates the table below the chart?
So for example, if I clicked the first bar in the chart, the table below it would be updated to show all the data for just that first bar.
Also, my table is a Pandas dataframe which I propagate into flask.
Code Base: https://repl.it/join/rbkobiqi-gullp
My intuition tells me, if some how I can pass the label back to the dataframe as a filter that should work.
Not sure how to approach this.