I am facing some issues, I will be very thankful if someone helps me out.
I am trying to filter a chart based on 2 dropdown’s selection in one callback function, is that possible if yes please help me with this.
2)I have 2 columns in a data frame and with these 2 columns, I am creating a chart but want to filter that chart based on the 3rd column which is present in the parent data frame(from which my 2 column data frame is derived) is that possible if yes please help me with this.
Hi @Deepan, this is totally possible. The following code is the necessary callback structure written in R. If you provide some more details I can help you with a more specific solution.
If you only struggle with the coding of the callback, then you will find your answer in this documentation: https://dash.plotly.com/basic-callbacks.
This explains how to write callbacks in python.
The logic inside the callback/function is the same.
filter the dataframe (exclude what you don’t want)
then make the plot, so the plot only contains the values you want
Or do you struggle with more basic things like filtering the dataframe etc.?
It would be easier to help you if you would go more into details. Some sample date for example or a screenshot.
If you are using two dropdowns to filter only one column you could use one multi-value dropdown instead, thereby making it unnecessary to use the second dropdown. Otherwise you would just include the second dropdown like the first. How this looks like is in the documentation I linked in the previous answer.