### Description

Currently Airflow has a `Filter Upstream` View/option inside the graph view. (As documented [here](https://docs.astronomer.io/learn/airflow-ui#graph-view) under `Filter Upstream`)

<img width="682" alt="image" src="https://user-images.githubusercontent.com/9246654/211711759-670a1180-7f90-4ecd-84b0-2f3b290ff477.png">

It would be great if there were also the options
1. `Filter Downstream` &
2. `Filter Downstream & Upstream`

### Use case/motivation

Sometimes it is useful to view downstream tasks & down & upstream tasks when reviewing dags. This feature would make it as easy to view those as it is to view upstream today.

### Related issues

I found nothing with a quick search

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

selected_dag_ids = {unquote(dag_id) for dag_id in request.form.getlist("dag_ids") if dag_id}
        if selected_dag_ids:
            filter_dag_ids = selected_dag_ids.intersection(allowed_dag_ids)
        else:
            filter_dag_ids = allowed_dag_ids
        if not filter_dag_ids:
            return flask.json.jsonify({})
        payload = {}
        dag_state_stats = dag_state_stats.filter(dr.dag_id.in_(filter_dag_ids))
        data = {}
        for dag_id, state, count in dag_state_stats:
            if dag_id not in data:
                data[dag_id] = {}
            data[dag_id][state] = count
        for dag_id in filter_dag_ids:
            payload[dag_id] = []
            for state in State.dag_states:
                count = data.get(dag_id, {}).get(state, 0)
                payload[dag_id].append({"state": state, "count": count})
        return flask.json.jsonify(payload)
    @expose("/task_stats", methods=["POST"])
    @auth.has_access(
        [
            (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG),
            (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG_RUN),
            (permissions.ACTION_CAN_READ, permissions.RESOURCE_TASK_INSTANCE),
        ]
    )
    @provide_session
    def task_stats(self, session=None):