from typing import List


def format_count(
    label: str, counts: List[int], color: str, dashed: bool = False
) -> dict:
    """Format a line dataset for chart.js"""
    ret = {
        "label": label,
        "data": counts,
        "borderColor": color,
        "borderWidth": 2,
        "fill": False,
    }
    if dashed:
        ret["borderDash"] = [5, 5]
    return ret