Chart Search Not Working Properly

I am using chart applications, and an advanced search that the user can apply. My issue, is that upon the search the chart does not refresh the data accordingly. The user has to apply the search twice before it works properly. Anyone PLEASE help