Hi Onur,
As I am not familiar with your exact use case and project, I will try my best.
As the datapoints in the chart are Mendix objects themselves, I assume that you need to update the chart object and set the correct datapoints after your datagrid search action. The chart won't listen automatically to datagrid search behavior or whatsoever. As this may result in quite heavy xPaths/database calls, I would advice you to rethink your page architecture as soon as this results in performance issues. Possibly you need to adjust the way you search the datagrid itself by using a custom search entity to make this all work.
Good luck! Hopefully this will give you some more ideas to think about.
Best,
Jeroen