def new_admissions_chart(alt, projection_admits: pd.DataFrame, parameters: Parameters) -> Chart:
    'docstring'
    plot_projection_days = (parameters.n_days - 10)
    max_y_axis = parameters.max_y_axis
    as_date = parameters.as_date
    y_scale = alt.Scale()
    if (max_y_axis is not None):
        y_scale.domain = (0, max_y_axis)
    tooltip_dict = {False: 'day', True: 'date:T'}
    if as_date:
        projection_admits = add_date_column(projection_admits)
        x_kwargs = {'shorthand': 'date:T', 'title': 'Date', 'axis': alt.Axis(format=DATE_FORMAT)}
    else:
        x_kwargs = {'shorthand': 'day', 'title': 'Days from today'}
    ceiled_admits = projection_admits.copy()
    ceiled_admits.hospitalized = np.ceil(ceiled_admits.hospitalized)
    ceiled_admits.icu = np.ceil(ceiled_admits.icu)
    ceiled_admits.ventilated = np.ceil(ceiled_admits.ventilated)
    return alt.Chart(ceiled_admits.head(plot_projection_days)).transform_fold(fold=['hospitalized', 'icu', 'ventilated']).mark_line(point=True).encode(x=alt.X(**x_kwargs), y=alt.Y('value:Q', title='Daily admissions', scale=y_scale), color='key:N', tooltip=[tooltip_dict[as_date], alt.Tooltip('value:Q', format='.0f', title='Admissions'), 'key:N']).interactive()
docstring
def new_admissions_chart(alt, projection_admits: pd.DataFrame, parameters: Parameters) -> Chart:
    
    plot_projection_days = (parameters.n_days - 10)
    max_y_axis = parameters.max_y_axis
    as_date = parameters.as_date
    y_scale = alt.Scale()
    if (max_y_axis is not None):
        y_scale.domain = (0, max_y_axis)
    tooltip_dict = {False: 'day', True: 'date:T'}
    if as_date:
        projection_admits = add_date_column(projection_admits)
        x_kwargs = {'shorthand': 'date:T', 'title': 'Date', 'axis': alt.Axis(format=DATE_FORMAT)}
    else:
        x_kwargs = {'shorthand': 'day', 'title': 'Days from today'}
    ceiled_admits = projection_admits.copy()
    ceiled_admits.hospitalized = np.ceil(ceiled_admits.hospitalized)
    ceiled_admits.icu = np.ceil(ceiled_admits.icu)
    ceiled_admits.ventilated = np.ceil(ceiled_admits.ventilated)
    return alt.Chart(ceiled_admits.head(plot_projection_days)).transform_fold(fold=['hospitalized', 'icu', 'ventilated']).mark_line(point=True).encode(x=alt.X(**x_kwargs), y=alt.Y('value:Q', title='Daily admissions', scale=y_scale), color='key:N', tooltip=[tooltip_dict[as_date], alt.Tooltip('value:Q', format='.0f', title='Admissions'), 'key:N']).interactive()