def create_widget_entry(email_to, email_from, email_to_total, email_from_total) -> dict:
    """
    Gets a email to and from addresses, and a to and from total incidents number.
    :param email_to: string
        email to address
    :param email_from: string
        email from address
    :param email_to_total: int
        email to relevant total incidents
    :param email_from_total: int
        email from relevant total incidents
    :return: data
        the relevant bar table
    """
    data = {
        "Type": 17,
        "ContentsFormat": "bar",
        "Contents": {
            "stats": [
                {
                    "data": [
                        email_to_total
                    ],
                    "groups": None,
                    "name": str(email_to),
                    "label": f"To: {str(email_to)}",
                    "color": "rgb(255, 23, 68)"
                },
                {
                    "data": [
                        email_from_total
                    ],
                    "groups": None,
                    "name": str(email_from),
                    "label": f"From: {str(email_from)}",
                    "color": "rgb(255, 144, 0)"
                }
            ],
            "params": {
                "layout": "vertical"
            }
        }
    }

    return data